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?
Using zsh autocompletion for alias
aliasautocompleteoh-my-zshzsh
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, removingsetopt completealiases
from my .zshrc resolved the issue. You can tryunsetopt completealises
if oh-my-zsh sets it.