diff --git a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh index d8ceb436..167a5ccf 100644 --- a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh +++ b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh @@ -55,7 +55,7 @@ if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then fi if [[ "$ENV_NAME" != "" ]]; then # Activate the environment only if it is not already active - if [[ "$VIRTUAL_ENV" != "$WORKON_HOME/$ENV_NAME" ]]; then + if [[ ! "$VIRTUAL_ENV" -ef "$WORKON_HOME/$ENV_NAME" ]]; then if [[ -e "$WORKON_HOME/$ENV_NAME/bin/activate" ]]; then workon "$ENV_NAME" && export CD_VIRTUAL_ENV="$ENV_NAME" elif [[ -e "$ENV_NAME/bin/activate" ]]; then