-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Ability to use $file
and $pwd
in shell commands and formatter args
#3642
Ability to use $file
and $pwd
in shell commands and formatter args
#3642
Conversation
Alternative to #3393 , the other PR probably matches better but will be harder to reuse for things like LSP config? |
insert-output: echo $file
and formatter args $file$file
in shell commands and formatter args
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
$file
in shell commands and formatter args$file
and $pwd
in shell commands and formatter args
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.
Also, instead of string replacement, it may be more elegant to set the env on the command https://doc.rust-lang.org/std/process/struct.Command.html#method.env although I'm not sure if that might make configs non-cross-platform
I'm not sure how I feel about this vs #3393-style (kakoune-like) variables. The kakoune-like variables don't look like unix environment variables which is a double edged sword - nice for Windows users but maybe less intuitive for unix users |
Addresses #3642 |
This is a work in progress, to satisfy my curiosity about a KISS way of going about it.
This will enable people to use
$file
and$pwd
forinsert-output
and formatter command args (the latter is what prompted me to test this idea).