diff --git a/bash/bashrc.d/prompt_command.bash b/bash/bashrc.d/prompt_command.bash index 5bff5d0..aaf6868 100644 --- a/bash/bashrc.d/prompt_command.bash +++ b/bash/bashrc.d/prompt_command.bash @@ -147,6 +147,8 @@ function __prompt_command() { PS1+=" " fi + PS1+="$(parse_python_venv)" + # user@hostname if color ; then PS1+="$(__colored_username)" @@ -344,3 +346,10 @@ function parse_git_dirty { echo "" fi } + +# get activated Python VirtualENV +function parse_python_venv { + if [ ! -z "${VIRTUAL_ENV_PROMPT}" ]; then + echo "$VIRTUAL_ENV_PROMPT" + fi +}