Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: completion for aliased commands does not work



Fourhundred Thecat wrote on Mon, Oct 31, 2016 at 23:47:21 +0100:
>   alias diff='colordiff'
>   diff --<TAB>
>   /usr/bin/diff --<TAB>

Completion "sees through" aliases.  You'll find that with the above
alias, «diff <TAB>» and «colordiff <TAB>» behave the same way.
Therefore, define a completion for colordiff:

    compdef colordiff=diff



Messages sorted by: Reverse Date, Date, Thread, Author