summaryrefslogtreecommitdiffstats
path: root/dotfiles/bashrc
diff options
context:
space:
mode:
Diffstat (limited to 'dotfiles/bashrc')
-rw-r--r--dotfiles/bashrc7
1 files changed, 6 insertions, 1 deletions
diff --git a/dotfiles/bashrc b/dotfiles/bashrc
index d49c012..09add68 100644
--- a/dotfiles/bashrc
+++ b/dotfiles/bashrc
@@ -30,6 +30,11 @@ _format_uid ()
fi
}
-PS1='\W$(_format_uid)$(_format_inroot_dir)$(__git_ps1 " [git %s]") \$ '
+PS1_PREFIX='\W$(_format_uid)$(_format_inroot_dir)'
+if test -n "$BASH_COMPLETION" && test -f /etc/bash_completion.d/git; then
+ PS1_PREFIX="$PS1_PREFIX"'$(__git_ps1 " [git %s]")'
+fi
+
+PS1="$PS1_PREFIX"' \$ '
export PS1