diff options
author | Colin Walters <walters@verbum.org> | 2010-07-15 11:14:28 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2010-07-15 11:14:28 -0400 |
commit | 4f312e890df956a858e1e7278cf1782b8f379d2c (patch) | |
tree | 4e5d343b941a0bc0f0b8c6450048eafa20d36ac1 /dotfiles/bashrc | |
parent | 4b62292e9573e3b5ede78e09e1fcb886f9e24419 (diff) | |
download | homegit-MOVED-TO-GNOME-4f312e890df956a858e1e7278cf1782b8f379d2c.tar.gz homegit-MOVED-TO-GNOME-4f312e890df956a858e1e7278cf1782b8f379d2c.tar.xz homegit-MOVED-TO-GNOME-4f312e890df956a858e1e7278cf1782b8f379d2c.zip |
Check for availability of git completion
Diffstat (limited to 'dotfiles/bashrc')
-rw-r--r-- | dotfiles/bashrc | 7 |
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 |