fix to use strings.Fields to split

This commit is contained in:
Takashi Fujita 2020-09-18 19:40:02 +09:00
parent e21be145b5
commit fce83774d2

View file

@ -101,7 +101,7 @@ func rename(args []string) error {
}
defer tty.Close()
editorWithArgs := strings.Split(editor, " ")
editorWithArgs := strings.Fields(editor)
editorWithArgs = append(editorWithArgs, f.Name())
cmd := exec.Command(editorWithArgs[0], editorWithArgs[1:]...)