Skip to content

Commit

Permalink
Fixes #1 and probably more issues
Browse files Browse the repository at this point in the history
  • Loading branch information
elboletaire committed Mar 16, 2014
1 parent ee902ef commit 8a2d2d4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions racotecnic.zsh-theme
Expand Up @@ -43,9 +43,9 @@ my_git_prompt_status() {
local count_conflict=$(echo "$INDEX" | grep -c '^U')
# working tree counters
local count_untracked=$(echo "$INDEX" | grep -c -E '^[\?A][\?A] ')
local count_modified_=$(echo "$INDEX" | grep -c -E '^[AD ][MT] ')
local count_deleted_=$(echo "$INDEX" | grep -c -E '^[AU ]D')
local count_conflict_=$(echo "$INDEX" | grep -c '^[U ]U')
local count_modified_=$(echo "$INDEX" | grep -c -E '^[A-Z ][MR] ')
local count_deleted_=$(echo "$INDEX" | grep -c -E '^[A-Z ]D ')
local count_conflict_=$(echo "$INDEX" | grep -c '^[A-Z ]U ')

# index
if $(echo "$INDEX" | grep '^A' &> /dev/null) || $(echo "$INDEX" | grep '^AM ' &> /dev/null); then
Expand All @@ -65,13 +65,13 @@ my_git_prompt_status() {
if $(echo "$INDEX" | grep -E '^[\?A][\?A] ' &> /dev/null); then
WORKING=" +$count_untracked"
fi
if $(echo "$INDEX" | grep -E '^[AD ][MT] ' &> /dev/null); then
if $(echo "$INDEX" | grep -E '^[A-Z ][MR] ' &> /dev/null); then
WORKING="$WORKING ~$count_modified_"
fi
if $(echo "$INDEX" | grep -E '^[AU ]D ' &> /dev/null); then
if $(echo "$INDEX" | grep -E '^[A-Z ]D ' &> /dev/null); then
WORKING="$WORKING -$count_deleted_"
fi
if $(echo "$INDEX" | grep '^[U ]U' &> /dev/null); then
if $(echo "$INDEX" | grep '^[A-Z ]U ' &> /dev/null); then
WORKING="$WORKING !$count_conflict_"
fi

Expand Down

1 comment on commit 8a2d2d4

@albertboada
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Please sign in to comment.