-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix to pass EDITOR command with args #10
Conversation
It look cool, but how is it common or standard to do this? Apparently % export EDITOR="vi -e"
% crontab -e
crontab: vi -e: No such file or directory Maybe it's not supported in other applications too. |
Exactly. I'm not sure that. I try to look at other things.:) |
I made sure of |
cmd/mmv/main.go
Outdated
@@ -100,7 +100,11 @@ func rename(args []string) error { | |||
return err | |||
} | |||
defer tty.Close() | |||
cmd := exec.Command(editor, f.Name()) | |||
|
|||
editorWithArgs := strings.Split(editor, " ") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change this split to strings.Fields
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 fixed fce8377
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't knew strings.Fields
. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Released as v0.1.2. |
Hi 😸 I like mmv! Thank you for your creativity.
$EDITOR
= vscode$EDITOR
with args. this below:I fixed to pass $EDITOR with args to
exec.Command
.What do you think of the approach?
Thanks!