mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2026-09-10 07:16:18 -04:00
Run the fish prompt only when PWD/PYENV_VERSION changes
This commit is contained in:
parent
13bc1877ef
commit
41f2b93fc8
|
|
@ -104,7 +104,7 @@ esac
|
|||
case "$shell" in
|
||||
fish )
|
||||
cat <<EOS
|
||||
function _pyenv_virtualenv_hook --on-event fish_prompt;
|
||||
function _pyenv_virtualenv_hook --on-variable PWD --on-variable PYENV_VERSION;
|
||||
set -l ret \$status
|
||||
if [ -n "\$VIRTUAL_ENV" ]
|
||||
pyenv activate --quiet; or pyenv deactivate --quiet; or true
|
||||
|
|
@ -113,6 +113,7 @@ function _pyenv_virtualenv_hook --on-event fish_prompt;
|
|||
end
|
||||
return \$ret
|
||||
end
|
||||
_pyenv_virtualenv_hook
|
||||
EOS
|
||||
;;
|
||||
ksh )
|
||||
|
|
|
|||
Loading…
Reference in a new issue