Skip to content

Commit

Permalink
Refactor z initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
sorin-ionescu committed Apr 12, 2012
1 parent 4270c8b commit c109f3f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions modules/z/init.zsh
Expand Up @@ -24,12 +24,14 @@ done
unset _z_prefix{es,} _z_sh

if (( $+functions[_z] )); then
alias z='nocorrect _z 2>&1'
alias j='z'
function z-precmd {
z --add "$(pwd -P)"
function _z-precmd {
_z --add "${PWD:A}"
}

autoload -Uz add-zsh-hook
add-zsh-hook precmd z-precmd
add-zsh-hook precmd _z-precmd

alias z='nocorrect _z'
alias j='nocorrect _z'
fi

0 comments on commit c109f3f

Please sign in to comment.