Skip to content

Commit

Permalink
Merge branch 'master' of github.com:dbushong/dotfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
dbushong committed Apr 12, 2014
2 parents 646f911 + b197d53 commit 1dd3106
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions dot.zshrc.base
Expand Up @@ -44,15 +44,14 @@ function set_git_prompt() {
_left='%B%m%b '
_right='%~ %B[%T]%b '

br=$(git symbolic-ref HEAD 2>/dev/null) && br=${br#refs/heads/}
br=$(git symbolic-ref HEAD 2>&1)

if [ "z$br" = "z" ]; then
if [ "$(git symbolic-ref HEAD 2>&1)" = \
'fatal: ref HEAD is not a symbolic ref' ]; then
_branch="%UNOBRANCH%u "
fi
elif [ "z$br" != zmaster ]; then
_branch="%U$br%u "
if [ "$br" = 'fatal: ref HEAD is not a symbolic ref' ]; then
_branch="%UNOBRANCH%u "
else
br=${br#refs/heads/}
br=${br:#fatal*}
[ -n "$br" -a "$br" != master ] && _branch="%U$br%u "
fi

export PROMPT="$_left$_branch$_right"
Expand Down

0 comments on commit 1dd3106

Please sign in to comment.