diff options
| author | Mike McQuaid | 2013-01-27 22:34:26 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2013-01-30 21:29:19 -0800 |
| commit | 8ab7cf827d0668a7a14697e5509cd22f4ddfa8e6 (patch) | |
| tree | 3e7a5e0e339683eb72a7ad3bb0cce94bd03b6c71 /Library/Formula | |
| parent | 32874cbcb855e6a765833f57af79ee6ad5b92f20 (diff) | |
| download | homebrew-8ab7cf827d0668a7a14697e5509cd22f4ddfa8e6.tar.bz2 | |
Add bash and zsh completion directory functions.
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/ack.rb | 4 | ||||
| -rw-r--r-- | Library/Formula/git.rb | 10 | ||||
| -rw-r--r-- | Library/Formula/hub.rb | 6 |
3 files changed, 10 insertions, 10 deletions
diff --git a/Library/Formula/ack.rb b/Library/Formula/ack.rb index 05562c536..6d25dd7e0 100644 --- a/Library/Formula/ack.rb +++ b/Library/Formula/ack.rb @@ -9,7 +9,7 @@ class Ack < Formula system "pod2man ack ack.1" man1.install 'ack.1' bin.install 'ack' - (prefix+'etc/bash_completion.d').install 'etc/ack.bash_completion.sh' - (share+'zsh/site-functions').install 'etc/ack.zsh_completion' => '_ack' + bash_completion.install 'etc/ack.bash_completion.sh' + zsh_completion.install 'etc/ack.zsh_completion' => '_ack' end end diff --git a/Library/Formula/git.rb b/Library/Formula/git.rb index abc0cc892..94fca646e 100644 --- a/Library/Formula/git.rb +++ b/Library/Formula/git.rb @@ -65,12 +65,12 @@ class Git < Formula bin.install 'git-subtree' end - # install the completion scripts from 'contrib' first - (etc+'bash_completion.d').install 'contrib/completion/git-completion.bash' - (etc+'bash_completion.d').install 'contrib/completion/git-prompt.sh' + # install the completion script first because it is inside 'contrib' + bash_completion.install 'contrib/completion/git-completion.bash' + bash_completion.install 'contrib/completion/git-prompt.sh' - (share+'zsh/site-functions').install 'contrib/completion/git-completion.zsh' => '_git' - ln_s "#{etc}/bash_completion.d/git-completion.bash", "#{share}/zsh/site-functions" + zsh_completion.install 'contrib/completion/git-completion.zsh' => '_git' + ln_sf "#{etc}/bash_completion.d/git-completion.bash", zsh_completion (share+'git-core').install 'contrib' diff --git a/Library/Formula/hub.rb b/Library/Formula/hub.rb index fb235f039..452a55c7f 100644 --- a/Library/Formula/hub.rb +++ b/Library/Formula/hub.rb @@ -8,9 +8,9 @@ class Hub < Formula head 'https://github.com/defunkt/hub.git' def install - system rake_bin, "install", "prefix=#{prefix}" - (prefix+'etc/bash_completion.d').install 'etc/hub.bash_completion.sh' - (share+'zsh/site-functions').install 'etc/hub.zsh_completion' => '_hub' + system "rake", "install", "prefix=#{prefix}" + bash_completion.install 'etc/hub.bash_completion.sh' + zsh_completion.install 'etc/hub.zsh_completion' => '_hub' end def rake_bin |
