aboutsummaryrefslogtreecommitdiffstats
path: root/home-dots/dot-bashrc
diff options
context:
space:
mode:
Diffstat (limited to 'home-dots/dot-bashrc')
-rw-r--r--home-dots/dot-bashrc9
1 files changed, 8 insertions, 1 deletions
diff --git a/home-dots/dot-bashrc b/home-dots/dot-bashrc
index 3286e43..aefd08b 100644
--- a/home-dots/dot-bashrc
+++ b/home-dots/dot-bashrc
@@ -34,6 +34,13 @@ git_current_branch() {
echo "  ${ref#refs/heads/}"
}
+python_current_venv() {
+ local orange="\[\e[0;91m\]"
+ if [[ -n ${VIRTUAL_ENV_PROMPT} ]]; then
+ echo " ${orange}${VIRTUAL_ENV_PROMPT}"
+ fi
+}
+
function __prompt_command {
# Must collect exit code very first thing
# Just calculating git_branch changes the exit code
@@ -46,7 +53,7 @@ function __prompt_command {
local normal="\[\e[0m\]"
local blue="\[\e[0;34m\]"
- PS1="\u@\h ${green}\w${blue}$(git_current_branch)"
+ PS1="\u@\h ${green}\w${blue}$(git_current_branch)$(python_current_venv)"
if [[ "${EXIT}" -ne 0 ]]; then
PS1+=" ${red}✗ ${yellow}${EXIT}${orange}"