Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [wgiokas@WST420: Re: Correct installation path for completion files]

William Giokas wrote:
> On Fri, Jul 26, 2013 at 08:23:06PM +0200, Frank Terbeck wrote:
>> It's hard to make it distribution-agnostic. The best way I can think of
>> is to use the output of this as the destination directory:
>>   zsh -fc 'print ${fpath[1]}'
> If vendor-functions is something special that distributions use, then
> they can specify that when they package this stuff. site-functions seems
> to be the default for zsh, so it seems that it should be the default for
> packages that install zsh completion.

The `vendor-*' directories debian uses are indeed *only* relevant for
*debian* packages. They are inside /usr/share, where you shouldn't put
non-package stuff on debian anyway.

Since we're not talking specifically about debian-packages, we can
ignore those and look at other possibilities, of which the
`site-functions' directory seems like the best fit.

The problem is, that the location of `site-functions' is not a fixed
value. It's a compile-time option. The default is
/usr/local/share/zsh/site-functions, but some vendors use
/usr/share/zsh/site-functions/, like you mentioned yourself in

But unless someone screws with $fpath in the global zshenv file, the
command I mentioned should return the site-functions location the
system's specific zsh binary was compiled with.

Putting additional function files in there will work fine.

Regards, Frank

Messages sorted by: Reverse Date, Date, Thread, Author