]> git.alrj.org Git - zsh.d.git/commitdiff
Update git status parsing.
authorAmand Tihon <atihon@iba-group.com>
Thu, 18 Dec 2014 10:14:34 +0000 (11:14 +0100)
committerAmand Tihon <atihon@iba-group.com>
Thu, 18 Dec 2014 10:15:42 +0000 (11:15 +0100)
S60_git

diff --git a/S60_git b/S60_git
index 78c163c7b8d9d48a3e70dc32501186a134163595..1061cf575a0a04d47412070ac157bdf7cc2b71fa 100644 (file)
--- a/S60_git
+++ b/S60_git
@@ -34,20 +34,20 @@ git_get_status() {
     # Return only git status
     local gitstat gitstatus
 
-    gitstat=$(git status 2> /dev/null | grep '\(# Untracked\|# Changes\|# Changed but not updated:\)')
+    gitstat=$(LANG=C git status 2> /dev/null | grep '\(Untracked\|Changes\|Changed but not updated:\)')
     # 'fix for mcedit parser
     gitstatus=""
 
-    if [[ $(echo ${gitstat} | grep -c "^Changes to be committed:$") > 0 ]]; then
+    if [[ $(echo ${gitstat} | grep -c "^Changes to be committed:$") > 0 ]]; then
       gitstatus='✚'
     fi
 
-    if [[ $(echo ${gitstat} | grep -c "^\# Changed but not updated:$") > 0 || \
-          $(echo ${gitstat} | grep -c "^\# Changes not staged for commit:$") > 0 ]]; then
+    if [[ $(echo ${gitstat} | grep -c "^Changed but not updated:$") > 0 || \
+          $(echo ${gitstat} | grep -c "^Changes not staged for commit:$") > 0 ]]; then
       gitstatus="${gitstatus}✹"
     fi
 
-    if [[ $(echo ${gitstat} | grep -c "^Untracked files:$") > 0 ]]; then
+    if [[ $(echo ${gitstat} | grep -c "^Untracked files:$") > 0 ]]; then
       gitstatus="${gitstatus}★"
     fi