3

I've built zsh from sources and installed it in /usr/local/bin/zsh. There was a packaged installation in /usr/bin/zsh as well.

Now, when I install some other packages they occasionally put their completion file into /usr/share/zsh/vendor-completions/_toolname. The problem is that my custom zsh does not recognize those files. I tried to make symlinks to those files into /usr/local/share/zsh/vendor-completions (I had to create the directory as well) but had no success.

While building zsh I simply run ./configure script, so PREFIX remained unchanged (and it is /usr/local) by default.

How to make vendor-completions work in my case?

Ivan Smirnov
  • 341
  • 2
  • 14

1 Answers1

4

Completions are loaded from directories from fpath array. So directory /usr/share/zsh/vendor-completions must be explicitly included in it:

# do it before 'compinit' in ~/.zshrc
fpath=($fpath /usr/share/zsh/vendor-completions)

I still have no idea why it wasn't included by default.

Ivan Smirnov
  • 341
  • 2
  • 14