How to launch a Bash function using Git alias
问题 I want to use a Git alias in ~/.gitconfig so that it calls a bash function, if it is defined, otherwise call the regular git checkout . This is what I have devised: cat ~/.gitconfig ... [alias] ... co = !(compgen -A function vxzExecuteGitCheckout >/dev/null && vxzExecuteGitCheckout ) || git checkout The problem is that Git uses /bin/sh (which happens to be dash in my case) and it barfs on compgen since it is a bash builtin. Any way making sure that Git uses bash to execute this command? Note