This commit is contained in:
benjaoming 2013-12-01 13:48:48 -08:00
commit bc8850f0ee

View file

@ -1,5 +1,10 @@
virtualenvwrapper='virtualenvwrapper_lazy.sh' virtualenvwrapper='virtualenvwrapper_lazy.sh'
if (( $+commands[$virtualenvwrapper] )); then if (( $+commands[$virtualenvwrapper] )); then
if [[ "$WORKON_HOME" == "" ]]; then
echo "\$WORKON_HOME is not defined so ZSH plugin virtualenvwrapper will not work"
else
source ${${virtualenvwrapper}:c} source ${${virtualenvwrapper}:c}
if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then
@ -50,6 +55,7 @@ if (( $+commands[$virtualenvwrapper] )); then
set -A chpwd_functions workon_cwd set -A chpwd_functions workon_cwd
fi fi
fi fi
fi
else else
print "zsh virtualenvwrapper plugin: Cannot find ${virtualenvwrapper}. Please install with \`pip install virtualenvwrapper\`." print "zsh virtualenvwrapper plugin: Cannot find ${virtualenvwrapper}. Please install with \`pip install virtualenvwrapper\`."
fi fi