mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2025-11-14 22:43:52 -05:00
Performe as same as before v20140614 if pyenv virtualenv-init is not configured (#26)
This commit is contained in:
@@ -65,6 +65,7 @@ fi
|
||||
case "$shell" in
|
||||
bash )
|
||||
cat <<EOS
|
||||
export PYENV_VIRTUALENV_INIT=1
|
||||
_pyenv_virtualenv_hook() {
|
||||
if [[ "\$(pyenv version-name)" == "system" ]]; then
|
||||
pyenv deactivate || true;
|
||||
@@ -80,6 +81,7 @@ EOS
|
||||
;;
|
||||
fish )
|
||||
cat <<EOS
|
||||
setenv PYENV_VIRTUALENV_INIT=1;
|
||||
function _pyenv_virtualenv_hook --on-event fish_prompt;
|
||||
if [ (pyenv version-name) = "system" ]
|
||||
eval (pyenv sh-deactivate); or true
|
||||
@@ -92,6 +94,7 @@ EOS
|
||||
;;
|
||||
zsh )
|
||||
cat <<EOS
|
||||
export PYENV_VIRTUALENV_INIT=1
|
||||
_pyenv_virtualenv_hook() {
|
||||
if [[ "\$(pyenv version-name)" == "system" ]]; then
|
||||
pyenv deactivate || true
|
||||
|
||||
Reference in New Issue
Block a user