summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xradar-base.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/radar-base.sh b/radar-base.sh
index e942332..9d52012 100755
--- a/radar-base.sh
+++ b/radar-base.sh
@@ -347,6 +347,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}"
@@ -363,6 +364,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"
}
@@ -396,6 +400,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}"
@@ -403,6 +408,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"
}