aboutsummaryrefslogtreecommitdiff
path: root/.bashrc
diff options
context:
space:
mode:
Diffstat (limited to '.bashrc')
-rw-r--r--.bashrc7
1 files changed, 5 insertions, 2 deletions
diff --git a/.bashrc b/.bashrc
index e66f8d2..54080e7 100644
--- a/.bashrc
+++ b/.bashrc
@@ -41,6 +41,9 @@ export HISTFILESIZE=10000
export HISTCONTROL=ignoreboth
# --- PROMPT
+__virtual_env_info() {
+ [ $VIRTUAL_ENV ] && echo "${VIRTUAL_ENV+(${VIRTUAL_ENV##*/})}"
+}
__ps1() {
local branch_color="\e[1;35m"
local branch_prompt
@@ -59,9 +62,9 @@ __ps1() {
case "$TERM" in
xterm-color|*-256color)
- PS1="\e[01;32m\u@\h\e[00m:\e[01;34m\W $branch_prompt_clr$sign_prompt_clr ";;
+ PS1="\e[0;33m$(__virtual_env_info)\e[01;32m\u@\h\e[00m:\e[01;34m\W $branch_prompt_clr$sign_prompt_clr ";;
*)
- PS1="\u@\h:\W $branch_prompt$sign_prompt ";;
+ PS1="$(__virtual_env_info)\u@\h:\W $branch_prompt$sign_prompt ";;
esac
}