mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2025-11-12 05:23:53 -05:00
allow users to configure prompt add-on
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user