diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-16 19:01:55 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-16 20:37:40 +1000 |
commit | be658e7d64c8d120a6c7ca9c59cbb05957135c1d (patch) | |
tree | b7aba616d475b82361d3f02f0948816f5c9779d8 /pkg/commands | |
parent | 53f06f6a4ecc9ad044c738db72ec96df26626c1e (diff) |
support multi word editor config
Diffstat (limited to 'pkg/commands')
-rw-r--r-- | pkg/commands/os.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/commands/os.go b/pkg/commands/os.go index 449c45b2c..81ebf951a 100644 --- a/pkg/commands/os.go +++ b/pkg/commands/os.go @@ -249,7 +249,9 @@ func (c *OSCommand) EditFile(filename string) (*exec.Cmd, error) { return nil, errors.New("No editor defined in $VISUAL, $EDITOR, or git config") } - return c.PrepareSubProcess(editor, filename), nil + splitCmd := str.ToArgv(fmt.Sprintf("%s %s", editor, filename)) + + return c.PrepareSubProcess(splitCmd[0], splitCmd[1:]...), nil } // PrepareSubProcess iniPrepareSubProcessrocess then tells the Gui to switch to it |