Updated virtualenvwrapper to auto workon at start; fixed compatibility with last-working-dir plugin.

This commit is contained in:
Cary Robbins 2014-08-14 00:11:11 -05:00
commit 210143ea4f

View file

@ -41,7 +41,11 @@ if (( $+commands[$virtualenvwrapper] )); then
unset PROJECT_ROOT unset PROJECT_ROOT
unset WORKON_CWD unset WORKON_CWD
fi fi
# In case we are using the last-working-dir plugin (virtualenv mucks this up).
command -v chpwd > /dev/null 2>&1 && chpwd || true
} }
# Go ahead and check to see if the current directory is a virtualenv.
workon_cwd
# Append workon_cwd to the chpwd_functions array, so it will be called on cd # Append workon_cwd to the chpwd_functions array, so it will be called on cd
# http://zsh.sourceforge.net/Doc/Release/Functions.html # http://zsh.sourceforge.net/Doc/Release/Functions.html