mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2025-11-13 14:03:53 -05:00
fix incorrect fish syntax in pyenv-virtualenv-init
This commit is contained in:
@@ -76,12 +76,12 @@ fish )
|
||||
cat <<EOS
|
||||
function _pyenv_virtualenv_hook --on-event fish_prompt;
|
||||
if [ -n "\$PYENV_ACTIVATE" ]
|
||||
if [ (pyenv version-name 2>/dev/null || true) = "system" ]
|
||||
if [ (pyenv version-name 2>/dev/null; or true) = "system" ]
|
||||
pyenv deactivate --no-error --verbose
|
||||
set -e PYENV_DEACTIVATE
|
||||
return 0
|
||||
end
|
||||
if [ "\$PYENV_ACTIVATE" != (pyenv prefix 2>/dev/null || true) ]
|
||||
if [ "\$PYENV_ACTIVATE" != (pyenv prefix 2>/dev/null; or true) ]
|
||||
if pyenv deactivate --no-error --verbose
|
||||
set -e PYENV_DEACTIVATE
|
||||
pyenv activate --no-error --verbose; or set -e PYENV_DEACTIVATE
|
||||
@@ -90,7 +90,7 @@ function _pyenv_virtualenv_hook --on-event fish_prompt;
|
||||
end
|
||||
end
|
||||
else
|
||||
if [ -z "\$VIRTUAL_ENV" ]; and [ "\$PYENV_DEACTIVATE" != (pyenv prefix 2>/dev/null || true) ]
|
||||
if [ -z "\$VIRTUAL_ENV" ]; and [ "\$PYENV_DEACTIVATE" != (pyenv prefix 2>/dev/null; or true) ]
|
||||
pyenv activate --no-error --verbose
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user