2012-02-01 04:37:51 +00:00
|
|
|
#
|
|
|
|
# Maintains a frequently used directory list for fast directory changes.
|
|
|
|
#
|
|
|
|
# Authors:
|
|
|
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
|
|
|
#
|
2011-08-31 04:02:50 +00:00
|
|
|
|
|
|
|
if [[ -f /etc/profile.d/z.zsh ]]; then
|
|
|
|
source /etc/profile.d/z.zsh
|
|
|
|
elif [[ -f /opt/local/etc/profile.d/z.zsh ]]; then
|
|
|
|
source /opt/local/etc/profile.d/z.zsh
|
|
|
|
elif [[ -f "$(brew --prefix 2> /dev/null)/etc/profile.d/z.sh" ]]; then
|
|
|
|
source "$(brew --prefix 2> /dev/null)/etc/profile.d/z.sh"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if (( $+functions[_z] )); then
|
|
|
|
alias z='nocorrect _z 2>&1'
|
|
|
|
alias j='z'
|
2012-03-23 18:57:51 +00:00
|
|
|
function z-precmd {
|
2011-08-31 04:02:50 +00:00
|
|
|
z --add "$(pwd -P)"
|
|
|
|
}
|
|
|
|
autoload -Uz add-zsh-hook
|
|
|
|
add-zsh-hook precmd z-precmd
|
|
|
|
fi
|
|
|
|
|