Permalink
Browse files

sun tail

(cherry picked from commit d1b8833)
  • Loading branch information...
Bryce Kerley
Bryce Kerley committed Sep 19, 2008
1 parent 26cf63c commit 94d140e7dcf75abca0be0c251fb79721189f42de
Showing with 3 additions and 3 deletions.
  1. +3 −3 06_git
View
6 06_git
@@ -15,8 +15,8 @@ if [[ -x `which git` ]]; then
}
function git-prompt() {
gstatus=$(git status 2> /dev/null)
- branch=$(echo $gstatus | head -n 1 | sed 's/^# On branch //')
- dirty=$(echo $gstatus | sed 's/^#.*$//' | tail -n 2 | grep 'nothing to commit (working directory clean)'; echo $?)
+ branch=$(echo $gstatus | head -1 | sed 's/^# On branch //')
+ dirty=$(echo $gstatus | sed 's/^#.*$//' | tail -2 | grep 'nothing to commit (working directory clean)'; echo $?)
if [[ x$branch != x ]]; then
dirty_color=$fg[cyan]
if [[ $dirty = 1 ]] { dirty_color=$fg[magenta] }
@@ -43,4 +43,4 @@ if [[ -x `which git` ]]; then
function nhgk () {
nohup gitk --all &
}
-fi
+fi

0 comments on commit 94d140e

Please sign in to comment.