aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorBryan Cribbs2011-06-15 19:25:52 -0500
committerAdam Vandenberg2011-06-15 20:24:54 -0700
commit2e826611bc1aa72fe6512d47f8bfe6ef9e3983f9 (patch)
tree2903cc3df0ddd536978e8048240dbb9e62b36245 /Library
parent7afaded8d4820399a1968552bc7992f7d7180b8e (diff)
downloadhomebrew-2e826611bc1aa72fe6512d47f8bfe6ef9e3983f9.tar.bz2
tmux: also install bash completion
The tmux distribution contains a bash completion script in examples/bash_completion_tmux.sh. Install it as 'tmux'. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/tmux.rb14
1 files changed, 10 insertions, 4 deletions
diff --git a/Library/Formula/tmux.rb b/Library/Formula/tmux.rb
index cab914ac6..d11ba43c5 100644
--- a/Library/Formula/tmux.rb
+++ b/Library/Formula/tmux.rb
@@ -11,11 +11,17 @@ class Tmux < Formula
ENV['PREFIX'] = prefix
system "./configure"
- inreplace "GNUmakefile" do |s|
- # Put docs in the right place
- s.gsub! "man/man1", "share/man/man1"
- end
+ # Put man pages in the right place
+ inreplace "GNUmakefile", "man/man1", "share/man/man1"
system "make install"
+ # Install bash completion scripts for use with bash-completion
+ (prefix+'etc/bash_completion.d').install "examples/bash_completion_tmux.sh" => 'tmux'
+ end
+
+ def caveats; <<-EOS.undent
+ Bash completion script was installed to:
+ #{etc}/bash_completion.d/tmux
+ EOS
end
end