How can I get bash to perform tab-completion for my aliases?

Posted by dstarh on Super User See other posts from Super User or by dstarh
Published on 2012-06-13T14:03:04Z Indexed on 2012/06/16 15:18 UTC
Read the original article Hit count: 189

Filed under:
|

I have a bunch of bash completion scripts set up (mostly using bash-it and some manually setup).

I also have a bunch of aliases setup for common tasks like gco for git checkout. Right now I can type git checkout dTab and develop is completed for me but when I type gco dTab it does not complete.

I'm assuming this is because the completion script is completing on git and it fails to see gco.

Is there a way to generically/programmatically get all of my completion scripts to work with my aliases? Not being able to complete when using the alias kind of defeats the purpose of the alias.

© Super User or respective owner

Related posts about bash

Related posts about tab-completion