mirror of
https://github.com/bcicen/ctop.git
synced 2024-08-30 18:23:19 +00:00
exec shell: remove shell config or option
The option is never worked and can't properly work because almost all containers anyway using Ash/Dash from /bin/sh
This commit is contained in:
parent
83a422933a
commit
5ec02f760e
@ -84,7 +84,6 @@ Option | Description
|
|||||||
`-s` | select initial container sort field
|
`-s` | select initial container sort field
|
||||||
`-scale-cpu` | show cpu as % of system total
|
`-scale-cpu` | show cpu as % of system total
|
||||||
`-v` | output version information and exit
|
`-v` | output version information and exit
|
||||||
`-shell` | exec shell to use (default: sh)
|
|
||||||
|
|
||||||
### Keybindings
|
### Keybindings
|
||||||
|
|
||||||
|
@ -12,11 +12,6 @@ var defaultParams = []*Param{
|
|||||||
Val: "state",
|
Val: "state",
|
||||||
Label: "Container Sort Field",
|
Label: "Container Sort Field",
|
||||||
},
|
},
|
||||||
&Param{
|
|
||||||
Key: "shell",
|
|
||||||
Val: "sh",
|
|
||||||
Label: "Shell",
|
|
||||||
},
|
|
||||||
&Param{
|
&Param{
|
||||||
Key: "columns",
|
Key: "columns",
|
||||||
Val: "status,name,id,cpu,mem,net,io,pids",
|
Val: "status,name,id,cpu,mem,net,io,pids",
|
||||||
|
5
main.go
5
main.go
@ -46,7 +46,6 @@ func main() {
|
|||||||
invertFlag = flag.Bool("i", false, "invert default colors")
|
invertFlag = flag.Bool("i", false, "invert default colors")
|
||||||
scaleCpu = flag.Bool("scale-cpu", false, "show cpu as % of system total")
|
scaleCpu = flag.Bool("scale-cpu", false, "show cpu as % of system total")
|
||||||
connectorFlag = flag.String("connector", "docker", "container connector to use")
|
connectorFlag = flag.String("connector", "docker", "container connector to use")
|
||||||
defaultShell = flag.String("shell", "", "exec shell to use")
|
|
||||||
)
|
)
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
@ -91,10 +90,6 @@ func main() {
|
|||||||
config.Toggle("scaleCpu")
|
config.Toggle("scaleCpu")
|
||||||
}
|
}
|
||||||
|
|
||||||
if *defaultShell != "" {
|
|
||||||
config.Update("shell", *defaultShell)
|
|
||||||
}
|
|
||||||
|
|
||||||
// init ui
|
// init ui
|
||||||
if *invertFlag {
|
if *invertFlag {
|
||||||
InvertColorMap()
|
InvertColorMap()
|
||||||
|
3
menus.go
3
menus.go
@ -359,8 +359,7 @@ func ExecShell() MenuFn {
|
|||||||
ui.DefaultEvtStream.ResetHandlers()
|
ui.DefaultEvtStream.ResetHandlers()
|
||||||
defer ui.DefaultEvtStream.ResetHandlers()
|
defer ui.DefaultEvtStream.ResetHandlers()
|
||||||
|
|
||||||
shell := config.GetVal("shell")
|
if err := c.Exec([]string{"/bin/sh", "-c", "printf '\\e[0m\\e[?25h' && clear && /bin/sh"}); err != nil {
|
||||||
if err := c.Exec([]string{shell, "-c", "printf '\\e[0m\\e[?25h' && clear && " + shell}); err != nil {
|
|
||||||
log.StatusErr(err)
|
log.StatusErr(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user