deb: install zsh completions to /usr/share/zsh/vendor-completions
This location is used by debian (and ubuntu) to store completions provided by
other deb packages. The default fpath appears to have this before any of the
zsh-provided instances of the completions, so this should take precedence.
Differential Revision: https://phab.mercurial-scm.org/D882
--- a/contrib/debian/rules Sun Oct 01 14:37:50 2017 +0100
+++ b/contrib/debian/rules Sun Oct 01 02:53:10 2017 -0700
@@ -33,4 +33,6 @@
cp contrib/debian/*.rc $(CURDIR)/debian/mercurial-common/etc/mercurial/hgrc.d/
mkdir -p $(CURDIR)/debian/mercurial-common/usr/share/bash-completion/completions
cp contrib/bash_completion $(CURDIR)/debian/mercurial-common/usr/share/bash-completion/completions/hg
+ mkdir -p $(CURDIR)/debian/mercurial-common/usr/share/zsh/vendor-completions
+ cp contrib/zsh_completion $(CURDIR)/debian/mercurial-common/usr/share/zsh/vendor-completions/_hg
rm $(CURDIR)/debian/mercurial-common/usr/bin/hg
--- a/tests/test-debian-packages.t Sun Oct 01 14:37:50 2017 +0100
+++ b/tests/test-debian-packages.t Sun Oct 01 02:53:10 2017 -0700
@@ -21,3 +21,6 @@
mercurial-common should have py but no .so or pyc
$ dpkg --contents mercurial-common_*.deb | egrep '(localrepo|parsers.*so)'
* ./usr/lib/python2.7/dist-packages/mercurial/localrepo.py (glob)
+zsh completions should be in the common package
+ $ dpkg --contents mercurial-common_*.deb | egrep 'zsh.*[^/]$'
+ * ./usr/share/zsh/vendor-completions/_hg (glob)