Performe as same as before v20140614 if pyenv virtualenv-init is not configured (#26)

This commit is contained in:
Yamashita Yuu
2014-06-15 16:32:25 +09:00
parent 4a6ef11349
commit d9e3adc108
5 changed files with 111 additions and 4 deletions

View File

@@ -65,6 +65,7 @@ fi
case "$shell" in
bash )
cat <<EOS
export PYENV_VIRTUALENV_INIT=1
_pyenv_virtualenv_hook() {
if [[ "\$(pyenv version-name)" == "system" ]]; then
pyenv deactivate || true;
@@ -80,6 +81,7 @@ EOS
;;
fish )
cat <<EOS
setenv PYENV_VIRTUALENV_INIT=1;
function _pyenv_virtualenv_hook --on-event fish_prompt;
if [ (pyenv version-name) = "system" ]
eval (pyenv sh-deactivate); or true
@@ -92,6 +94,7 @@ EOS
;;
zsh )
cat <<EOS
export PYENV_VIRTUALENV_INIT=1
_pyenv_virtualenv_hook() {
if [[ "\$(pyenv version-name)" == "system" ]]; then
pyenv deactivate || true