Sample Header Ad - 728x90

How do I get bash completion for command aliases?

141 votes
10 answers
63577 views
I am looking to get tab-completion on my command line aliases, for example, say I defined the following alias : alias apt-inst='sudo aptitude install' Is there a way to get the completions provided by aptitude when I hit the tab key? i.e. when I write 'sudo aptitude install gnumer' and hit tab, aptitude completes this to gnumeric, or if there was uncertainty lists all the available packages starting with gnumer. If I do it using my alias, nothing - no completion.
Asked by levesque (3915 rep)
Nov 20, 2010, 04:13 PM
Last activity: Jul 21, 2025, 09:57 PM