Search code examples
gitfish

Can fish shell interpolate functions when expanding to their full form?


Given the following abbreviation, where git_branch_name returns the current git branch name:

abbr -a ggl 'git pull origin (git_branch_name)'

Is there a way to have the the function interpolate when the abbreviation is expanded?

# This is what the abbreviation expands to
$ git pull origin (git_branch_name)

# This is the expansion I am looking for
$ git pull origin master

Solution

  • No, it is not yet possible for an abbreviation to run code when it expands. I expect we'll add this capability before long.