mirror of
https://github.com/itchyny/mmv.git
synced 2025-12-26 22:24:58 +08:00
fix to pass EDITOR command with args
This commit is contained in:
parent
f854148e5f
commit
e21be145b5
1 changed files with 5 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue