From 82d8dbca04437a5924a04dc2e76e65789105080d Mon Sep 17 00:00:00 2001 From: Christoph Bruecke Date: Wed, 31 Jul 2013 17:12:27 +0200 Subject: autojump: HEAD - Support fish. Copy the autojump.fish config file to add autojump support with fish. Closes #21583. Signed-off-by: Adam Vandenberg --- Library/Formula/autojump.rb | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/autojump.rb b/Library/Formula/autojump.rb index 876a59cd9..b68a04b59 100644 --- a/Library/Formula/autojump.rb +++ b/Library/Formula/autojump.rb @@ -12,15 +12,26 @@ class Autojump < Formula bin.install 'bin/autojump' man1.install 'docs/autojump.1' - (prefix+'etc').install 'bin/autojump.sh', 'bin/autojump.bash', 'bin/autojump.zsh' + (prefix/'etc').install 'bin/autojump.sh', 'bin/autojump.bash', 'bin/autojump.zsh' zsh_completion.install 'bin/_j' + (prefix/'etc').install 'bin/autojump.fish' if build.head? end - def caveats; <<-EOS.undent + def caveats; + msg = <<-EOS.undent Add the following line to your ~/.bash_profile or ~/.zshrc file (and remember to source the file to update your current session): - - [[ -s `brew --prefix`/etc/autojump.sh ]] && . `brew --prefix`/etc/autojump.sh + [[ -s `brew --prefix`/etc/autojump.sh ]] && . `brew --prefix`/etc/autojump.sh EOS + + if build.head? + msg += <<-EOS.undent + + Add the following line to your ~/.config/fish/config.fish: + . /usr/local/Cellar/autojump/HEAD/etc/autojump.fish + EOS + end + + msg end end -- cgit v1.2.3