use fish_preexec for hook

This commit is contained in:
Merilynn Bandy 2023-04-11 13:50:21 -06:00
parent 85d8c5aabf
commit 5ba0f8bdb9
No known key found for this signature in database
GPG key ID: 3D463BCC4E2C6CE1

View file

@ -104,7 +104,7 @@ esac
case "$shell" in
fish )
cat <<EOS
function _pyenv_virtualenv_hook --on-event fish_prompt;
function _pyenv_virtualenv_hook --on-event fish_preexec;
set -l ret \$status
if [ -n "\$VIRTUAL_ENV" ]
pyenv activate --quiet; or pyenv deactivate --quiet; or true