mirror of
https://github.com/bcicen/ctop.git
synced 2025-12-06 15:16:41 +08:00
exec shell: fix shell config
Currently each time when ctop started it overwrites "shell" config with default value of program argument. This means that in fact default shell config is never worked at all.
This commit is contained in:
4
menus.go
4
menus.go
@@ -359,8 +359,8 @@ func ExecShell() MenuFn {
|
||||
ui.DefaultEvtStream.ResetHandlers()
|
||||
defer ui.DefaultEvtStream.ResetHandlers()
|
||||
|
||||
shell := config.Get("shell")
|
||||
if err := c.Exec([]string{shell.Val, "-c", "printf '\\e[0m\\e[?25h' && clear && " + shell.Val}); err != nil {
|
||||
shell := config.GetVal("shell")
|
||||
if err := c.Exec([]string{shell, "-c", "printf '\\e[0m\\e[?25h' && clear && " + shell}); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user