From a6ef00280a667e900d7ef9d95f722c3b179b1389 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristan=20Mah=C3=A9?= Date: Wed, 11 Nov 2015 13:55:10 -0800 Subject: [PATCH] virtualenvwrapper: deactivate when parent dir is a git repository and changing dir to the parent --- plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh index 6cd30732..fa871308 100644 --- a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh +++ b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh @@ -61,7 +61,7 @@ if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then else ENV_NAME="" fi - if [[ "$ENV_NAME" != "" ]]; then + if [[ "$ENV_NAME" != "" && ("$ENV_NAME" = "$CD_VIRTUAL_ENV" || "$CD_VIRTUAL_ENV" = "" ) ]]; then # Activate the environment only if it is not already active if [[ "$VIRTUAL_ENV" != "$WORKON_HOME/$ENV_NAME" ]]; then if [[ -e "$WORKON_HOME/$ENV_NAME/bin/activate" ]]; then