mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-19 21:41:07 +01:00
fix(pipenv): fix auto-shell functionality when cd-ing out (#12813)
Co-authored-by: Jean-Tiare Le Bigot <jt@yadutaf.fr>
This commit is contained in:
parent
9ad764d80c
commit
2e8d2d7401
1 changed files with 4 additions and 2 deletions
|
@ -19,7 +19,8 @@ if zstyle -T ':omz:plugins:pipenv' auto-shell; then
|
||||||
if [[ ! -f "$PWD/Pipfile" ]]; then
|
if [[ ! -f "$PWD/Pipfile" ]]; then
|
||||||
if [[ "$PIPENV_ACTIVE" == 1 ]]; then
|
if [[ "$PIPENV_ACTIVE" == 1 ]]; then
|
||||||
if [[ "$PWD" != "$pipfile_dir"* ]]; then
|
if [[ "$PWD" != "$pipfile_dir"* ]]; then
|
||||||
exit
|
unset PIPENV_ACTIVE pipfile_dir
|
||||||
|
deactivate
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -28,7 +29,8 @@ if zstyle -T ':omz:plugins:pipenv' auto-shell; then
|
||||||
if [[ "$PIPENV_ACTIVE" != 1 ]]; then
|
if [[ "$PIPENV_ACTIVE" != 1 ]]; then
|
||||||
if [[ -f "$PWD/Pipfile" ]]; then
|
if [[ -f "$PWD/Pipfile" ]]; then
|
||||||
export pipfile_dir="$PWD"
|
export pipfile_dir="$PWD"
|
||||||
pipenv shell
|
source "$(pipenv --venv)/bin/activate"
|
||||||
|
export PIPENV_ACTIVE=1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue