1
0
Fork 0

prevent workon CD in virtualenvwrapper zsh plugin

This commit is contained in:
Luca Bilke 2024-03-06 16:06:37 +01:00
parent fa31fdc0f9
commit 1020104980

View file

@ -25,7 +25,7 @@ workon_cwd() {
[ -n "$ENV_NAME" ] && [ ! "$(realpath "$VIRTUAL_ENV" 2>/dev/null)" = "$(realpath "$WORKON_HOME/$ENV_NAME")" ] && {
if [ -e "$WORKON_HOME/$ENV_NAME/bin/activate" ]; then
workon "$ENV_NAME" && export CD_VIRTUAL_ENV="$ENV_NAME"
workon -n "$ENV_NAME" && export CD_VIRTUAL_ENV="$ENV_NAME"
elif [ -e "$ENV_NAME/bin/activate" ]; then
source "$ENV_NAME/bin/activate" && export CD_VIRTUAL_ENV="$ENV_NAME"
else