summaryrefslogtreecommitdiff
path: root/12_Prompts.zsh
diff options
context:
space:
mode:
authorHugues Hiegel <hugues.hiegel@qosmos.com>2012-07-27 10:26:09 +0200
committerHugues Hiegel <hugues.hiegel@qosmos.com>2012-07-27 10:26:09 +0200
commit966f82cb0d4560cad7f18a4cbd0eb742a40d025a (patch)
treeb98e77a465efbb2f4ba1943029d223afce426f3a /12_Prompts.zsh
parent752e1697e3111cf61fbd964020f651c6571d9e1b (diff)
[Git] new ffwd-able color + blinking stash..
Diffstat (limited to '12_Prompts.zsh')
-rw-r--r--12_Prompts.zsh9
1 files changed, 1 insertions, 8 deletions
diff --git a/12_Prompts.zsh b/12_Prompts.zsh
index 548ab46..5f6f48b 100644
--- a/12_Prompts.zsh
+++ b/12_Prompts.zsh
@@ -44,14 +44,7 @@ chpwd()
if ( __cmd_exists git && test -d .git )
then
# Shows tracked branches and modified files
- git status | awk '
- BEGIN { YOURBRANCH=0 }
- {
- if (NR==2 && $0 ~ "^# Your branch ") { YOURBRANCH=1 }
- if ((NR>=2 && YOURBRANCH==0) || $0 ~ "^#$") { exit }
- if (YOURBRANCH==1) { print $0 }
- }
- ' | sed 's/^# / /'
+ git status | sed -n '2{/# Your branch/p};3q'
fi
}