Show activating... messages by default

This commit is contained in:
Yamashita, Yuu
2015-11-06 17:27:50 +00:00
parent dae2788f56
commit bf7e9ba59a
3 changed files with 12 additions and 16 deletions

View File

@@ -87,9 +87,7 @@ if [ -z "$PYENV_VIRTUALENV_INIT" ]; then
pyenv-virtualenv-init >&2 || true pyenv-virtualenv-init >&2 || true
fi fi
if [ -n "$VERBOSE" ]; then echo "pyenv-virtualenv: activate ${versions}" 1>&2
echo "pyenv-virtualenv: activate ${versions}" 1>&2
fi
if [ -z "$no_shell" ]; then if [ -z "$no_shell" ]; then
echo "pyenv shell \"${versions}\";" echo "pyenv shell \"${versions}\";"

View File

@@ -36,9 +36,7 @@ if [ -z "${VIRTUAL_ENV}" ]; then
exit 1 exit 1
fi fi
if [ -n "$VERBOSE" ]; then echo "pyenv-virtualenv: deactivate ${prefix##*/}" 1>&2
echo "pyenv-virtualenv: deactivate ${prefix##*/}" 1>&2
fi
if [ -n "${PYENV_ACTIVATE_SHELL}" ]; then if [ -n "${PYENV_ACTIVATE_SHELL}" ]; then
# shell version set in pyenv-sh-activate should be unset # shell version set in pyenv-sh-activate should be unset

View File

@@ -106,21 +106,21 @@ function _pyenv_virtualenv_hook --on-event fish_prompt;
set -l ret \$status set -l ret \$status
if [ -n "\$PYENV_ACTIVATE" ] if [ -n "\$PYENV_ACTIVATE" ]
if [ (pyenv version-name 2>/dev/null; or true) = "system" ] if [ (pyenv version-name 2>/dev/null; or true) = "system" ]
pyenv deactivate --no-error --verbose pyenv deactivate --no-error
set -e PYENV_DEACTIVATE set -e PYENV_DEACTIVATE
return \$ret return \$ret
end end
if [ "\$PYENV_ACTIVATE" != "\$PYENV_PREFIX" ] if [ "\$PYENV_ACTIVATE" != "\$PYENV_PREFIX" ]
if pyenv deactivate --no-error --verbose if pyenv deactivate --no-error
set -e PYENV_DEACTIVATE set -e PYENV_DEACTIVATE
pyenv activate --no-error --verbose; or set -e PYENV_DEACTIVATE pyenv activate --no-error; or set -e PYENV_DEACTIVATE
else else
pyenv activate --no-error --verbose pyenv activate --no-error
end end
end end
else else
if [ -z "\$VIRTUAL_ENV" ]; and [ "\$PYENV_DEACTIVATE" != "\$PYENV_PREFIX" ] if [ -z "\$VIRTUAL_ENV" ]; and [ "\$PYENV_DEACTIVATE" != "\$PYENV_PREFIX" ]
pyenv activate --no-error --verbose; or true pyenv activate --no-error; or true
end end
end end
return \$ret return \$ret
@@ -144,21 +144,21 @@ if [[ "$shell" != "fish" ]]; then
local ret=\$? local ret=\$?
if [ -n "\$PYENV_ACTIVATE" ]; then if [ -n "\$PYENV_ACTIVATE" ]; then
if [ "\$(pyenv version-name 2>/dev/null || true)" = "system" ]; then if [ "\$(pyenv version-name 2>/dev/null || true)" = "system" ]; then
eval "\$(pyenv sh-deactivate --no-error --verbose)" eval "\$(pyenv sh-deactivate --no-error)"
unset PYENV_DEACTIVATE unset PYENV_DEACTIVATE
return \$ret return \$ret
fi fi
if [ "\$PYENV_ACTIVATE" != "\$(pyenv prefix 2>/dev/null || true)" ]; then if [ "\$PYENV_ACTIVATE" != "\$(pyenv prefix 2>/dev/null || true)" ]; then
if eval "\$(pyenv sh-deactivate --no-error --verbose)"; then if eval "\$(pyenv sh-deactivate --no-error)"; then
unset PYENV_DEACTIVATE unset PYENV_DEACTIVATE
eval "\$(pyenv sh-activate --no-error --verbose)" || unset PYENV_DEACTIVATE eval "\$(pyenv sh-activate --no-error)" || unset PYENV_DEACTIVATE
else else
eval "\$(pyenv sh-activate --no-error --verbose)" eval "\$(pyenv sh-activate --no-error)"
fi fi
fi fi
else else
if [ -z "\$VIRTUAL_ENV" ] && [ "\$PYENV_DEACTIVATE" != "\$(pyenv prefix 2>/dev/null || true)" ]; then if [ -z "\$VIRTUAL_ENV" ] && [ "\$PYENV_DEACTIVATE" != "\$(pyenv prefix 2>/dev/null || true)" ]; then
eval "\$(pyenv sh-activate --no-error --verbose)" || true eval "\$(pyenv sh-activate --no-error)" || true
fi fi
fi fi
return \$ret return \$ret