fix fish prompt

This commit is contained in:
romir kulshrestha 2024-02-09 06:19:06 +01:00
parent 2b2b87a25a
commit 9d0e422d3f
No known key found for this signature in database
2 changed files with 15 additions and 2 deletions

View file

@ -245,7 +245,14 @@ if [ -z "${PYENV_VIRTUALENV_DISABLE_PROMPT}" ]; then
case "${shell}" in
fish )
if [ -z "${QUIET}" ]; then
echo "pyenv-virtualenv: prompt changing not working for fish." 1>&2
cat <<EOS
functions -e _pyenv_old_prompt
functions -c fish_prompt _pyenv_old_prompt
function fish_prompt
echo -n "(${venv}) "
_pyenv_old_prompt
end
EOS
fi
;;
* )

View file

@ -187,7 +187,13 @@ esac
case "${shell}" in
fish )
:
cat <<EOS
if functions -q _pyenv_old_prompt
functions -e fish_prompt
functions -c _pyenv_old_prompt fish_prompt
functions -e _pyenv_old_prompt
end
EOS
;;
* )
cat <<EOS