Skip to content
Snippets Groups Projects
Commit c6b1301d authored by Jörg Sachse's avatar Jörg Sachse
Browse files

feat: show Python virtualenv if one is activated

parent 0c07f91d
No related branches found
No related tags found
No related merge requests found
...@@ -67,8 +67,15 @@ function __prompt_command() { ...@@ -67,8 +67,15 @@ function __prompt_command() {
PS1="[${RC_GREEN}${CURR_EXIT}${DEFAULT_FOREGROUND}]" # displays green exit status if everything went well PS1="[${RC_GREEN}${CURR_EXIT}${DEFAULT_FOREGROUND}]" # displays green exit status if everything went well
fi fi
# find out if we're inside of a virtualenv
local VENV_STRING=""
if [[ -n ${VIRTUAL_ENV} ]]; then
VENV_STRING="[$( basename ${VIRTUAL_ENV} )]"
fi
# final Bash prompt assembly # final Bash prompt assembly
PS1="${PS1}${BACKGROUND}${USERAT}${PATH_GREEN}[\w]\[$(tput sgr0)\]" PS1="${PS1}${BACKGROUND}${USERAT}${PATH_GREEN}[\w]\[$(tput sgr0)\]"
PS1="${PS1}${VENV_STRING}"
PS1="${PS1}${USERHASH} " PS1="${PS1}${USERHASH} "
# add Git branch to PS1 if CWD is a Git Repo # add Git branch to PS1 if CWD is a Git Repo
#source /usr/lib/git-core/git-sh-prompt #source /usr/lib/git-core/git-sh-prompt
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment