z: fix caveats
Closes Homebrew/homebrew#14621. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
parent
89d1e1a6a5
commit
cb14ed4047
1 changed files with 12 additions and 6 deletions
18
Formula/z.rb
18
Formula/z.rb
|
@ -13,16 +13,22 @@ class Z < Formula
|
|||
end
|
||||
|
||||
def caveats; <<-EOS.undent
|
||||
For Bash, put something like this in your $HOME/.bashrc:
|
||||
For Bash or Zsh, put something like this in your $HOME/.bashrc or $HOME/.zshrc:
|
||||
|
||||
. `brew --prefix`/etc/profile.d/z.sh
|
||||
|
||||
For Zsh, put something like this in your $HOME/.zshrc:
|
||||
ZSH USERS BACKWARD COMPATIBILITY WARNING:
|
||||
z now handles 'precmd' set up for zsh. z (<=1.2) users using zsh should
|
||||
remove the precmd function that was described in the installation
|
||||
instructions for previous versions.
|
||||
|
||||
. `brew --prefix`/etc/profile.d/z.sh
|
||||
function precmd () {
|
||||
z --add "$(pwd -P)"
|
||||
}
|
||||
In short, this:
|
||||
. /path/to/z.sh
|
||||
function precmd () {
|
||||
_z --add "$(pwd -P)"
|
||||
}
|
||||
should now just be:
|
||||
. `brew --prefix`/etc/profile.d/z.sh
|
||||
EOS
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue