homebrew-core/Formula/autojump.rb
Christoph Bruecke 3286fc5d38 autojump: HEAD - Support fish.
Copy the autojump.fish config file to add autojump support with fish.

Closes Homebrew/homebrew#21583.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-08-05 21:59:16 -07:00

37 lines
1.1 KiB
Ruby

require 'formula'
class Autojump < Formula
homepage 'https://github.com/joelthelion/autojump#name'
url 'https://github.com/joelthelion/autojump/archive/release-v21.6.9.tar.gz'
sha1 '9d13e56ec1abf76e0e955d754e8a62616bb102a7'
head 'https://github.com/joelthelion/autojump.git'
def install
inreplace 'bin/autojump.sh', ' /etc/profile.d/', " #{prefix}/etc/"
bin.install 'bin/autojump'
man1.install 'docs/autojump.1'
(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;
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
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