2011-02-27 23:08:50 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Z < Formula
|
|
|
|
homepage 'https://github.com/rupa/z'
|
2013-03-17 15:55:22 +00:00
|
|
|
url 'https://github.com/rupa/z/archive/v1.5.tar.gz'
|
|
|
|
sha1 '3ae2f570dbab9820ec0bb7ddb0346172bfb596db'
|
2011-02-27 23:08:50 +00:00
|
|
|
|
2011-05-27 05:02:55 +00:00
|
|
|
head 'https://github.com/rupa/z.git'
|
2011-02-27 23:08:50 +00:00
|
|
|
|
|
|
|
def install
|
2013-01-11 05:55:34 +00:00
|
|
|
(prefix/'etc/profile.d').install 'z.sh'
|
2011-02-27 23:08:50 +00:00
|
|
|
man1.install 'z.1'
|
|
|
|
end
|
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
2012-09-01 19:43:37 +00:00
|
|
|
For Bash or Zsh, put something like this in your $HOME/.bashrc or $HOME/.zshrc:
|
2013-01-11 06:34:57 +00:00
|
|
|
. `brew --prefix`/etc/profile.d/z.sh
|
2011-02-27 23:08:50 +00:00
|
|
|
|
2013-01-11 05:55:34 +00:00
|
|
|
ZSH USERS BACKWARD COMPATIBILITY WARNING:
|
2012-09-02 01:02:27 +00:00
|
|
|
z now handles 'precmd' set up for zsh. z (<=1.3) users using zsh should
|
2012-09-01 19:43:37 +00:00
|
|
|
remove the precmd function that was described in the installation
|
|
|
|
instructions for previous versions.
|
2011-02-27 23:08:50 +00:00
|
|
|
|
2013-01-11 06:34:57 +00:00
|
|
|
In short, this:
|
2013-01-11 05:55:34 +00:00
|
|
|
. /path/to/z.sh
|
|
|
|
function precmd () {
|
|
|
|
_z --add "$(pwd -P)"
|
|
|
|
}
|
|
|
|
|
2013-01-11 06:34:57 +00:00
|
|
|
should now be:
|
2013-01-11 05:55:34 +00:00
|
|
|
. `brew --prefix`/etc/profile.d/z.sh
|
2011-02-27 23:08:50 +00:00
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|