How do I get bash completion to work with aliases?

As stated in the comments above,

complete -o default -o nospace -F _git_checkout gco

will no longer work. However, there’s a __git_complete function in git-completion.bash which can be used to set up completion for aliases like so:

__git_complete gco _git_checkout

Leave a Comment