Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixing git prompt without bash-completion

  • Loading branch information...
commit b177cea43e3813412376c65cb972fbeb683bb07a 1 parent ba4efff
Chad Ostrowski authored committed
Showing with 6 additions and 5 deletions.
  1. +6 −5 .bash_prompt
View
11 .bash_prompt
@@ -81,20 +81,21 @@ On_IWhite='\[\e[0;107m\]' # White
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
+
+ export GIT_PS1_SHOWDIRTYSTATE=1
+ export GIT_PS1_SHOWSTASHSTATE=1
+ export GIT_PS1_SHOWUNTRACKEDFILES=1
else
function parse_git_dirty() {
- [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo " * "
+ [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo " * "
}
function __git_ps1() {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1$(parse_git_dirty)/"
}
fi
-export GIT_PS1_SHOWDIRTYSTATE=1
-export GIT_PS1_SHOWSTASHSTATE=1
-export GIT_PS1_SHOWUNTRACKEDFILES=1
# This is used locally. Cool blue.
-PS1="${BIBlue}${On_Black} \W ${Black}⮀${Purple} \$(__git_ps1 %s'')${Reset}"
+PS1="${BIBlue}${On_Black} \W ${Black}⮀${Purple} \$(__git_ps1 %s) ⮁ ${Reset}"
# This is for production servers
#PS1="${BIYellow}${On_Red} \W ${Red}⮀${Reset} "
# And this is for non-production servers
Please sign in to comment.
Something went wrong with that request. Please try again.