Browse Source

Show `activating...` messages by default

pull/110/head
Yamashita, Yuu 9 years ago
parent
commit
bf7e9ba59a
3 changed files with 12 additions and 16 deletions
  1. +1
    -3
      bin/pyenv-sh-activate
  2. +1
    -3
      bin/pyenv-sh-deactivate
  3. +10
    -10
      bin/pyenv-virtualenv-init

+ 1
- 3
bin/pyenv-sh-activate View File

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

+ 1
- 3
bin/pyenv-sh-deactivate View File

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

+ 10
- 10
bin/pyenv-virtualenv-init View File

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

Loading…
Cancel
Save