From bf7e9ba59afe5df24e21cf2e6100420dd3e8af89 Mon Sep 17 00:00:00 2001 From: "Yamashita, Yuu" Date: Fri, 6 Nov 2015 17:27:50 +0000 Subject: [PATCH] Show `activating...` messages by default --- bin/pyenv-sh-activate | 4 +--- bin/pyenv-sh-deactivate | 4 +--- bin/pyenv-virtualenv-init | 20 ++++++++++---------- 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/bin/pyenv-sh-activate b/bin/pyenv-sh-activate index 4fff676..90e0877 100755 --- a/bin/pyenv-sh-activate +++ b/bin/pyenv-sh-activate @@ -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}\";" diff --git a/bin/pyenv-sh-deactivate b/bin/pyenv-sh-deactivate index ee7e03e..e9270d2 100755 --- a/bin/pyenv-sh-deactivate +++ b/bin/pyenv-sh-deactivate @@ -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 diff --git a/bin/pyenv-virtualenv-init b/bin/pyenv-virtualenv-init index db15aa3..c7b3d7e 100755 --- a/bin/pyenv-virtualenv-init +++ b/bin/pyenv-virtualenv-init @@ -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