Using zsh autocompletion for alias

aliasautocompleteoh-my-zshzsh

I have created a few aliases for git in zsh, for example gch = git checkout, grb = git rebase –committer-date-is-author-date and some more complex useful zsh functions for git commands. But how can I allow these aliases to use zsh git autocompletion?

Best Answer

I've had the same issue. You should check whether the option completealiases is set. What it is doing it is preventing aliases from being internally substituted before completion is attempted. In my case, removing setopt completealiases from my .zshrc resolved the issue. You can try unsetopt completealises if oh-my-zsh sets it.

Related Question