homebrew-core/Formula/git-flow.rb
Christian Höltje 5180ae9a7f git-flow: install completion into site-functions
`_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/homebrew#11936 for details.

Closes Homebrew/homebrew#11941.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-02 23:43:51 -05:00

37 lines
1 KiB
Ruby

require 'formula'
class GitFlowCompletion < Formula
homepage 'https://github.com/bobthecow/git-flow-completion'
url 'https://github.com/bobthecow/git-flow-completion/tarball/0.4.1.0'
md5 '95c05d1a278c1c41067bd7cc6c281ecd'
head 'https://github.com/bobthecow/git-flow-completion.git', :branch => 'develop'
end
class GitFlow < Formula
homepage 'https://github.com/nvie/gitflow'
# Use the tag instead of the tarball to get the submodule
url 'https://github.com/nvie/gitflow.git', :tag => '0.4.1'
version '0.4.1'
head 'https://github.com/nvie/gitflow.git', :branch => 'develop'
def install
system "make", "prefix=#{prefix}", "install"
GitFlowCompletion.new.brew do
(prefix+'etc/bash_completion.d').install "git-flow-completion.bash"
(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