Use chpwd hook instead of overriding cd command

This commit is contained in:
Pavel Puchkin 2013-04-27 01:14:47 -03:00 committed by Capi Etheriel
commit 32bacf8d02

View file

@ -37,10 +37,8 @@ if [[ -f "$wrapsource" ]]; then
fi
}
# New cd function that does the virtualenv magic
function cd {
builtin cd "$@" && _workon_cwd
}
# Add hook to chpwd function
add-zsh-hook chpwd _workon_cwd
fi
else
print "zsh virtualenvwrapper plugin: Cannot find virtualenvwrapper_lazy.sh. Please install with \`pip install virtualenvwrapper\`."