aboutsummaryrefslogtreecommitdiff
path: root/.bashrc
diff options
context:
space:
mode:
Diffstat (limited to '.bashrc')
-rw-r--r--.bashrc5
1 files changed, 4 insertions, 1 deletions
diff --git a/.bashrc b/.bashrc
index d5f0250..511ae17 100644
--- a/.bashrc
+++ b/.bashrc
@@ -73,7 +73,10 @@ __precmd()
PS1+="\001$SHELLC_F_BLUE\002\w\001$SHELLC_RESET_COLOR_F\002"
# Add venv indicator
- PS1+="\001$SHELLC_F_CYAN\002#$(awk -F/ '{ print $(NF-1) }' <<< "$PYTHON_VENV_DIR")\001$SHELLC_RESET_COLOR_F\002"
+ 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