diff options
Diffstat (limited to '.bashrc')
-rw-r--r-- | .bashrc | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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 @@ -98,11 +104,13 @@ __precmd() fi # Add the exit code of the previous command - PS1+=" " + PS1+=" " 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" |