hub: install completion into site-functions

`_hub` needs to be installed into `share/zsh/site-functions`
not `share/zsh/functions`.

Files in `share/zsh/functions` must not change unless zsh is
upgraded and zsh is restarted.  `site-functions` can change during a zsh
process's lifetime.

Closes Homebrew/homebrew#11938.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
Christian Höltje 2012-04-29 02:55:56 -04:00 committed by Jack Nagel
parent 3bdc970ab5
commit 72d1022eae

View file

@ -9,7 +9,7 @@ class Hub < Formula
def install
system "rake", "install", "prefix=#{prefix}"
(prefix+'etc/bash_completion.d').install 'etc/hub.bash_completion.sh'
(share+'zsh/functions').install 'etc/hub.zsh_completion' => '_hub'
(share+'zsh/site-functions').install 'etc/hub.zsh_completion' => '_hub'
end
def caveats; <<-EOS.undent
@ -17,7 +17,7 @@ class Hub < Formula
#{etc}/bash_completion.d
zsh completion has been installed to:
#{HOMEBREW_PREFIX}/share/zsh/functions
#{HOMEBREW_PREFIX}/share/zsh/site-functions
EOS
end
end