help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-bash] Command completion for an alias


From: contact
Subject: [Help-bash] Command completion for an alias
Date: Sat, 30 May 2015 14:15:45 +0200
User-agent: Roundcube Webmail/1.1.1

Hi folks!

My .bashrc defines some aliases like alias gs='git status'. I'd like to enable command completion for aliases so that when the command line is (| is the cursor):

$ gs |

and I press Tab I'd like to see the completions as if I typed 'git status '. I found a bunch of resources demonstrating how to do this [1][2][3] but in my opinion they lack elegance. My question is: how to make completion work for aliases? If bash needs to modified where should I start looking in the source code?

Best regards

[1] http://ubuntuforums.org/showthread.php?t=733397
[2] https://stackoverflow.com/questions/342969/how-do-i-get-bash-completion-to-work-with-aliases [3] https://unix.stackexchange.com/questions/4219/how-do-i-get-bash-completion-for-command-aliases
--
Greg Navis



reply via email to

[Prev in Thread] Current Thread [Next in Thread]