jonas / tig

Text-mode interface for git

Home Page:https://jonas.github.io/tig/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[question] How to launch a command and substitute an environment variable?

MartyLake opened this issue · comments

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,

Try with bind diff f !sh -c "git absorb -v --base $GIT_ABSORB_BASE".

It works, thanks!