shell version set in activate should be unset in deactivate (#61)

This commit is contained in:
Yamashita Yuu
2014-12-23 11:21:52 +09:00
parent 4b198663c7
commit 191e806ba9
4 changed files with 46 additions and 19 deletions

View File

@@ -43,10 +43,18 @@ if [ -n "$VERBOSE" ]; then
echo " echo \"pyenv-virtualenv: deactivate ${prefix##*/}\" 1>&2;"
fi
if [ -z "${PYENV_VIRTUALENV_INIT}" ]; then
# Backward compatibility issue
# https://github.com/yyuu/pyenv-virtualenv/issues/26
if [ -n "${PYENV_ACTIVATE_SHELL}" ]; then
# shell version set in pyenv-sh-activate should be unset
# https://github.com/yyuu/pyenv-virtualenv/issues/61
echo " pyenv shell --unset;"
case "$shell" in
fish )
echo " set -e PYENV_ACTIVATE_SHELL;"
;;
* )
echo " unset PYENV_ACTIVATE_SHELL;"
;;
esac
fi
case "$shell" in