32229958eb
`_autojump` 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#11942. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
31 lines
952 B
Ruby
31 lines
952 B
Ruby
require 'formula'
|
|
|
|
class Autojump < Formula
|
|
homepage 'https://github.com/joelthelion/autojump/wiki'
|
|
url 'https://github.com/downloads/joelthelion/autojump/autojump_v20.tar.gz'
|
|
md5 '5297817c33959cb5afc070f5d174b24f'
|
|
|
|
head 'https://github.com/joelthelion/autojump.git'
|
|
|
|
def install
|
|
inreplace 'autojump.sh', '/etc/profile.d/', "#{prefix}/etc/"
|
|
|
|
bin.install 'autojump'
|
|
man1.install 'autojump.1'
|
|
(prefix+'etc').install 'autojump.sh' => 'autojump'
|
|
(prefix+'etc').install 'autojump.bash', 'autojump.zsh'
|
|
(share+'zsh/site-functions').install '_j'
|
|
end
|
|
|
|
def caveats; <<-EOS.undent
|
|
Add the following lines to your ~/.bash_profile or ~/.zshrc file (and
|
|
remember to source the file to update your current session):
|
|
if [ -f `brew --prefix`/etc/autojump ]; then
|
|
. `brew --prefix`/etc/autojump
|
|
fi
|
|
|
|
zsh completion has been installed to:
|
|
#{HOMEBREW_PREFIX}/share/zsh/site-functions
|
|
EOS
|
|
end
|
|
end
|