mirror of
https://github.com/kastdeur/dotfiles.git
synced 2025-02-22 17:15:07 +01:00
[bash] include VIRTUAL_ENV_PROMPT in PS1
This commit is contained in:
parent
4466fb4f0f
commit
2a2eeecbfd
1 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue