diff --git a/cmd/mmv/main.go b/cmd/mmv/main.go index 0e8fde2..54b7a03 100644 --- a/cmd/mmv/main.go +++ b/cmd/mmv/main.go @@ -100,7 +100,11 @@ func rename(args []string) error { return err } defer tty.Close() - cmd := exec.Command(editor, f.Name()) + + editorWithArgs := strings.Split(editor, " ") + editorWithArgs = append(editorWithArgs, f.Name()) + + cmd := exec.Command(editorWithArgs[0], editorWithArgs[1:]...) cmd.Stdin = tty.Input() cmd.Stdout = tty.Output() cmd.Stderr = tty.Output()