summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Hunter <m@lfurio.us>2026-03-08 17:06:44 -0400
committerMatt Hunter <m@lfurio.us>2026-03-16 04:36:28 -0400
commitf4636c75050f3ac3208d953c4d88c29d58309bdc (patch)
treede0a60ffa368556dc53bff8e1391e73143b87b49
parent85aaf4533896a1398482559692e34e02366e89a0 (diff)
downloadgit-sonar-f4636c75050f3ac3208d953c4d88c29d58309bdc.tar.gz
git-sonar-f4636c75050f3ac3208d953c4d88c29d58309bdc.zip
Remove bash string indexing
This syntax is undefined in POSIX shell. Instead, use what should be a more robust solution, and literally strip the $separator from the beginning of the string, rather than just hard coding a length. Signed-off-by: Matt Hunter <m@lfurio.us>
-rwxr-xr-xgit-sonar2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-sonar b/git-sonar
index 08a12df..52319b6 100755
--- a/git-sonar
+++ b/git-sonar
@@ -261,7 +261,7 @@ color_changes_status() {
changes="$staged_changes$conflicted_changes$unstaged_changes$untracked_changes"
fi
- printf $PRINT_F_OPTION "${changes:1}"
+ printf $PRINT_F_OPTION "${changes#"$separator"}"
}
color_local_commits() {