[Pkg-zsh-devel] Bug#934926: Bug#934926: overridding of default fpath causes uncessary complexity and pain for software providing zsh completions
Daniel Shahaf
danielsh at apache.org
Fri Aug 16 20:00:48 BST 2019
Joey Hess wrote on Fri, 16 Aug 2019 18:35 +00:00:
> By default zsh loads completions from /usr/share/zsh/site-functions
> and while the name of that is perhaps not great, as it's not
> site-specific[1], it's a standard location. Debian has overridden this,
> so zsh does not look there, but instead in
> /usr/share/zsh/vendor-functions and /usr/share/zsh/vendor-completions
...
> The rationalle for the change in #620452 seems too weak to justify this
> added complexity. zsh could at least continue looking in the default
> location as well as whatever other locations Debian wants to patch in.
Let's see:
$ /usr/bin/zsh -fc 'print -rl $fpath' | head -3 # that's the Debian package, 5.7.1-1
/usr/local/share/zsh/site-functions
/usr/share/zsh/vendor-functions
/usr/share/zsh/vendor-completions
$ /srv/zsh/bin/zsh -fc 'print -rl $fpath' | head -3 # that's zsh compiled from upstream with --prefix=/srv/zsh
/usr/local/share/zsh/site-functions
/srv/zsh/share/zsh/site-functions
/srv/zsh/share/zsh/5.6.2-test-2/functions
$
So /usr/local/share/zsh/site-functions is still there for stuff installed
by the administrator, and vendor-functions and vendor-completions are
added in there for stuff provided by other Debian packages. Are you
just asking to re-add ${PREFIX:-/usr}/share/zsh/site-functions there,
presumably between the first and second elements?
On the one hand, it _would_ be consistent with upstream, but on the
other hand, nobody should be putting anything in a site-functions
directory under /usr/share (admins should be putting their
customizations in /usr/local/share; other Debian packages should be
putting their stuff in vendor-functions or vendor-completions). I don't
have a strong opinion on this, so I'll defer to others to make the call.
I suppose that if we add this, we should also add
${PREFIX}/share/zsh/${ZSH_VERSION}/functions, shouldn't we?
Cheers,
Daniel
More information about the Pkg-zsh-devel
mailing list