summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Hunter <m@lfurio.us>2026-05-16 17:47:48 -0400
committerMatt Hunter <m@lfurio.us>2026-05-16 17:47:48 -0400
commitc607f9c93c0ecb41994a91b4cfebda4efcce7d9e (patch)
treed941cf1921db18bf1d04bcf0502d8298aa5e9e6a
parentf8eaa83cb1ee52ae742e15d91d863247cc37e48a (diff)
downloadgit-sonar-c607f9c93c0ecb41994a91b4cfebda4efcce7d9e.tar.gz
git-sonar-c607f9c93c0ecb41994a91b4cfebda4efcce7d9e.zip
Allow configurable color reset code
I found the original context behind why git-radar had custom color reset codes. It sums up to playing more nicely with a background color, such as something used in a "power line" style prompt. This use-case makes sense, so re-introduce a config variable to control this. We still don't need an individual reset value for each prompt element, so keep it to the single general one, defaulted to \033[0m. Link: https://github.com/michaeldfallen/git-radar/issues/14 Signed-off-by: Matt Hunter <m@lfurio.us>
Diffstat (limited to '')
-rwxr-xr-xgit-sonar2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-sonar b/git-sonar
index 615e053..6d21831 100755
--- a/git-sonar
+++ b/git-sonar
@@ -76,7 +76,7 @@ COLOR_RED="\\001\\033[1;31m\\002"
COLOR_GREEN="\\001\\033[1;32m\\002"
COLOR_YELLOW="\\001\\033[1;33m\\002"
COLOR_WHITE="\\001\\033[1;37m\\002"
-COLOR_DEF="\\001\\033[0m\\002"
+COLOR_DEF="${GIT_SONAR_DEFAULT_COLOR:-"\\001\\033[0m\\002"}"
FETCH_TIME="${GIT_SONAR_FETCH_TIME:-"300"}"