aboutsummaryrefslogtreecommitdiff
path: root/.bashrc
diff options
context:
space:
mode:
Diffstat (limited to '.bashrc')
-rw-r--r--.bashrc8
1 files changed, 8 insertions, 0 deletions
diff --git a/.bashrc b/.bashrc
index f526efa..511ae17 100644
--- a/.bashrc
+++ b/.bashrc
@@ -72,6 +72,12 @@ __precmd()
PS1+="\001$SHELLC_F_LIGHTGRAY\002:\001$SHELLC_RESET_COLOR_F\002"
PS1+="\001$SHELLC_F_BLUE\002\w\001$SHELLC_RESET_COLOR_F\002"
+ # Add venv indicator
+ if [[ -n "$PYTHON_VENV_DIR" ]]
+ then
+ PS1+="\001$SHELLC_F_CYAN\002#$(awk -F/ '{ print $(NF-1) }' <<< "$PYTHON_VENV_DIR")\001$SHELLC_RESET_COLOR_F\002"
+ fi
+
# Add git status
if git rev-parse --is-inside-work-tree &> /dev/null
then
@@ -103,6 +109,8 @@ __precmd()
if [[ $previous_exit -ne 0 ]]
then
PS1+="\001$SHELLC_F_RED\002"
+ else
+ PS1+="\001$SHELLC_F_LIGHTGRAY\002"
fi
PS1+="$(printf "%03i" "$previous_exit")\001$SHELLC_RESET_COLOR_F\002"