mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-04-10 04:26:17 +02:00
virtualenvwrapper: deactivate when parent dir is a git repository and changing dir to the parent
This commit is contained in:
parent
e44aa50301
commit
a6ef00280a
1 changed files with 1 additions and 1 deletions
|
|
@ -61,7 +61,7 @@ if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then
|
||||||
else
|
else
|
||||||
ENV_NAME=""
|
ENV_NAME=""
|
||||||
fi
|
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
|
# Activate the environment only if it is not already active
|
||||||
if [[ "$VIRTUAL_ENV" != "$WORKON_HOME/$ENV_NAME" ]]; then
|
if [[ "$VIRTUAL_ENV" != "$WORKON_HOME/$ENV_NAME" ]]; then
|
||||||
if [[ -e "$WORKON_HOME/$ENV_NAME/bin/activate" ]]; then
|
if [[ -e "$WORKON_HOME/$ENV_NAME/bin/activate" ]]; then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue