From b63fbc85fda00873e5e6984de53971c0d229660b Mon Sep 17 00:00:00 2001 From: Steven Hall Date: Tue, 7 Mar 2017 22:34:20 -0800 Subject: [PATCH] Added TC for typechanged status --- radar-base.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/radar-base.sh b/radar-base.sh index 61503fd..25a72b2 100755 --- a/radar-base.sh +++ b/radar-base.sh @@ -337,6 +337,7 @@ staged_status() { local filesDeleted="$(printf '%s' "$gitStatus" | grep -oE "D[AMCR ] " | wc -l | grep -oEi '[1-9][0-9]*')" local filesRenamed="$(printf '%s' "$gitStatus" | grep -oE "R[AMCD ] " | wc -l | grep -oEi '[1-9][0-9]*')" local filesCopied="$(printf '%s' "$gitStatus" | grep -oE "C[AMDR ] " | wc -l | grep -oEi '[1-9][0-9]*')" + local typeChanged="$(printf '%s' "$gitStatus" | grep -oE "T[AMDR ] " | wc -l | grep -oEi '[1-9][0-9]*')" if [ -n "$filesAdded" ]; then staged_string="$staged_string$filesAdded${prefix}A${suffix}" @@ -353,6 +354,9 @@ staged_status() { if [ -n "$filesCopied" ]; then staged_string="$staged_string$filesCopied${prefix}C${suffix}" fi + if [ -n "$typeChanged" ]; then + staged_string="$staged_string$typeChanged${prefix}TC${suffix}" + fi printf '%s' "$staged_string" } @@ -386,6 +390,7 @@ unstaged_status() { local filesModified="$(printf '%s' "$gitStatus" | grep -oE "[ACDRM ]M " | wc -l | grep -oEi '[1-9][0-9]*')" local filesDeleted="$(printf '%s' "$gitStatus" | grep -oE "[AMCR ]D " | wc -l | grep -oEi '[1-9][0-9]*')" + local typeChanged="$(printf '%s' "$gitStatus" | grep -oE "[AMDR ]T " | wc -l | grep -oEi '[1-9][0-9]*')" if [ -n "$filesDeleted" ]; then unstaged_string="$unstaged_string$filesDeleted${prefix}D${suffix}" @@ -393,6 +398,9 @@ unstaged_status() { if [ -n "$filesModified" ]; then unstaged_string="$unstaged_string$filesModified${prefix}M${suffix}" fi + if [ -n "$typeChanged" ]; then + unstaged_string="$unstaged_string$typeChanged${prefix}TC${suffix}" + fi printf '%s' "$unstaged_string" }