@Ilua's answer did not work, but it did give me some ideas of what to search for, and I solved the problem.
The style I needed was regular. From man zshcompsys:
regular
This style is used by the _expand_alias completer and bindable command.
If set to ‘true’ (the default), regular aliases will be expanded but only in command position.
If it is set to ‘false’, regular aliases will never be expanded.
If it is set to ‘always’, regular aliases will be expanded even if not in command position.
I used zstyle ':completion:*' regular 'false', and it works perfectly.
Best Answer
zsh can do this internally. Put this into your
.zshrc
:before
(add the latter lines if not already present)
See the zsh documentation for details.