helix icon indicating copy to clipboard operation
helix copied to clipboard

Ability to use `$file` and `$pwd` in shell commands and formatter args

Open AlexanderBrevig opened this issue 2 years ago • 1 comments

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 for insert-output and formatter command args (the latter is what prompted me to test this idea).

  • [x] make use of Env in more places (all the shell interactions)
  • [x] find issues and PRs to link to - I know there is pre-existing work on this
  • [ ] figure out if the declarative approach is OK, or if we want something a bit more "sticky"

AlexanderBrevig avatar Sep 01 '22 22:09 AlexanderBrevig

Alternative to #3393 , the other PR probably matches better but will be harder to reuse for things like LSP config?

AlexanderBrevig avatar Sep 03 '22 10:09 AlexanderBrevig

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

the-mikedavis avatar Sep 27 '22 23:09 the-mikedavis

Addresses https://github.com/helix-editor/helix/pull/3642

kirawi avatar Dec 30 '22 16:12 kirawi