From 210143ea4fed481f56d381b8f0fcf2feae0ac98f Mon Sep 17 00:00:00 2001 From: Cary Robbins Date: Thu, 14 Aug 2014 00:11:11 -0500 Subject: [PATCH] Updated virtualenvwrapper to auto workon at start; fixed compatibility with last-working-dir plugin. --- plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh index f58bda1ad..9e061a2a6 100644 --- a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh +++ b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh @@ -41,7 +41,11 @@ if (( $+commands[$virtualenvwrapper] )); then unset PROJECT_ROOT unset WORKON_CWD 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 # http://zsh.sourceforge.net/Doc/Release/Functions.html