diff options
author | Michael Allen <michael@michaelallen.io> | 2015-07-23 19:35:09 +0100 |
---|---|---|
committer | Michael Allen <michael@michaelallen.io> | 2015-07-23 19:35:09 +0100 |
commit | 5c31b9242140877bef777dd37f0810457bd9b64a (patch) | |
tree | b1f29561e5b0dd7ea8a302fc21c1426c9de61543 /git-base.sh | |
parent | 292a040b4abbbf085b97f7b285e67c97960dc510 (diff) | |
download | git-sonar-5c31b9242140877bef777dd37f0810457bd9b64a.tar.gz git-sonar-5c31b9242140877bef777dd37f0810457bd9b64a.zip |
provide the ability to surround letter in a status with a color
Diffstat (limited to '')
-rwxr-xr-x | git-base.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/git-base.sh b/git-base.sh index 2385592..9152caf 100755 --- a/git-base.sh +++ b/git-base.sh @@ -277,7 +277,7 @@ unstaged_status() { local suffix=${3:-""} local unstaged_string="" - local filesModified="$(echo "$gitStatus" | grep -p "[AMCDR ]M " | wc -l | grep -oEi '[1-9][0-9]*')" + local filesModified="$(echo "$gitStatus" | grep -p "[ACDR ]M " | wc -l | grep -oEi '[1-9][0-9]*')" local filesDeleted="$(echo "$gitStatus" | grep -p "[AMCR ]D " | wc -l | grep -oEi '[1-9][0-9]*')" if [ -n "$filesDeleted" ]; then @@ -298,7 +298,7 @@ untracked_status() { local filesUntracked="$(echo "$gitStatus" | grep -p "?? " | wc -l | grep -oEi '[1-9][0-9]*')" if [ -n "$filesUntracked" ]; then - untracked_string="$untracked_string$filesUntracked$untracked$added" + untracked_string="$untracked_string$filesUntracked${prefix}A${suffix}" fi echo "$untracked_string" } |