I have advanced alias's in my .gitconfig file that I would like to support tab completion.
For example, this simple alias allows for tab completion of refs (assuming the git completions have been sourced):
[alias]
co = checkout
However, this does not:
[alias]
co = "!f() { git checkout \"${@}\"; }; f}"
Is there any way to add support for tab completion to these alias's?
It turns out that it has been possible to add tab-completion support to a "complex alias" since at least git v2.1.0. Per git-completion.bash:
Therefore, this works:
Note that the pattern,
!f
is significant. This does not work:! f
(inserted space, although the name of the function is not significant).