[question] How to launch a command and substitute an environment variable?
MartyLake opened this issue · comments
Matthieu Talbot commented
Hello,
Actually, this mapping
bind status f !git absorb -v --base $GIT_ABSORB_BASE
bind diff f !git absorb -v --base $GIT_ABSORB_BASE
calls git absorb -v --base "$GIT_ABSORB_BASE"
with no substitution..
I would expect it to call git absorb -v --base $GIT_ABSORB_BASE
instead, allowing the environment variable to be inserted in-place of $GIT_ABSORB_BASE
.
Do you know how to do it ?
Best,
Thomas Koutcher commented
Try with bind diff f !sh -c "git absorb -v --base $GIT_ABSORB_BASE"
.
Matthieu Talbot commented
It works, thanks!