Skip to content

Commit

Permalink
git-flow: install completion into site-functions
Browse files Browse the repository at this point in the history
`_git-flow` 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.

This will enable homebrew's zsh to automatically use the completion.
See issue Homebrew#11936 for details.

Closes Homebrew#11941.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
  • Loading branch information
docwhat authored and rohansingh committed May 7, 2012
1 parent b1124a7 commit f1352b5
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Library/Formula/git-flow.rb
Expand Up @@ -22,7 +22,16 @@ def install

GitFlowCompletion.new.brew do
(prefix+'etc/bash_completion.d').install "git-flow-completion.bash"
(share+'zsh/functions').install "git-flow-completion.zsh"
(share+'zsh/site-functions').install "git-flow-completion.zsh"
end
end

def caveats; <<-EOS.undent
Bash completion has been installed to:
#{etc}/bash_completion.d
zsh completion has been installed to:
#{HOMEBREW_PREFIX}/share/zsh/site-functions
EOS
end
end

0 comments on commit f1352b5

Please sign in to comment.