mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2025-11-12 13:33:52 -05:00
allow users to configure prompt add-on
This commit is contained in:
@@ -262,9 +262,14 @@ EOS
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
* )
|
* )
|
||||||
|
if [ -z "${PYENV_VIRTUALENV_PROMPT}" ]; then
|
||||||
|
PYENV_VIRTUALENV_PROMPT="(${venv})"
|
||||||
|
else
|
||||||
|
PYENV_VIRTUALENV_PROMPT="${PYENV_VIRTUALENV_PROMPT/\{venv\}/${venv}}"
|
||||||
|
fi
|
||||||
cat <<EOS
|
cat <<EOS
|
||||||
export _OLD_VIRTUAL_PS1="\${PS1:-}";
|
export _OLD_VIRTUAL_PS1="\${PS1:-}";
|
||||||
export PS1="(${venv}) \${PS1:-}";
|
export PS1="${PYENV_VIRTUALENV_PROMPT} \${PS1:-}";
|
||||||
EOS
|
EOS
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
Reference in New Issue
Block a user