As far as I can tell, my .zshrc
doesn't manually source anything in /usr/share/zsh/vendor-completions
. If I try to write, in my .zshrc
, an alias for a command that has completions set up in /usr/share/zsh/vendor-completions
, it doesn't work. However, if I edit the completions file in /usr/share/zsh/vendor-completions
to add my aliasing at the end, then it does work.
For example, let's say I have a program foo
, and a program bar
that is an enhanced version of foo
. And let's say I have tab completions in /usr/share/zsh/vendor-completions
for foo
but not for bar
. So when I write alias foo=bar
and compdef bar=foo
in my .zshrc
, the tab completions don't work. But if I write those two lines in /usr/share/zsh/vendor-completions
, in the same file that sets up foo
's tab completions, then it does work.
It seems like /usr/share/zsh/vendor-completions
is loaded after .zshrc
, but I couldn't find documentation on it. I'd like to know where vendor completions fit in during zsh's loading sequence, so I can confirm what is the right thing to do, as a package maintainer.
vendor-completions
in the zsh source code. That must be an addition by your Unix vendor. Which is it?/usr/share/doc/zsh-common/README.Debian
/usr/share/zsh/vendor-completions
gets loaded, but at least I know this isn't standard.fpath
, which makes this easy to figure out. If you want to write this up as an answer then I am happy to accept it and give you some rep, otherwise I will answer my own question.