mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2026-09-15 17:56:29 -04:00
allow users to configure prompt add-on
This commit is contained in:
parent
0f83c33a3b
commit
9f3afd0cfb
|
|
@ -262,9 +262,14 @@ EOS
|
|||
fi
|
||||
;;
|
||||
* )
|
||||
if [ -z "${PYENV_VIRTUALENV_PROMPT}" ]; then
|
||||
PYENV_VIRTUALENV_PROMPT="(${venv})"
|
||||
else
|
||||
PYENV_VIRTUALENV_PROMPT="${PYENV_VIRTUALENV_PROMPT/\{venv\}/${venv}}"
|
||||
fi
|
||||
cat <<EOS
|
||||
export _OLD_VIRTUAL_PS1="\${PS1:-}";
|
||||
export PS1="(${venv}) \${PS1:-}";
|
||||
export PS1="${PYENV_VIRTUALENV_PROMPT} \${PS1:-}";
|
||||
EOS
|
||||
;;
|
||||
esac
|
||||
|
|
|
|||
Loading…
Reference in a new issue