mirror of
https://github.com/itchyny/mmv.git
synced 2026-02-04 03:53:24 +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
|
return err
|
||||||
}
|
}
|
||||||
defer tty.Close()
|
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.Stdin = tty.Input()
|
||||||
cmd.Stdout = tty.Output()
|
cmd.Stdout = tty.Output()
|
||||||
cmd.Stderr = tty.Output()
|
cmd.Stderr = tty.Output()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue