From f8eaa83cb1ee52ae742e15d91d863247cc37e48a Mon Sep 17 00:00:00 2001 From: Matt Hunter Date: Wed, 13 May 2026 08:57:21 -0400 Subject: Escape backslashes for \001 and \002 bytes There are some contexts/shells in which the extra escape character is necessary, so fixup the color constants in git-sonar. Doing so doesn't break any current use-cases. User overrides may or may not need to do the same. Signed-off-by: Matt Hunter --- git-sonar | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/git-sonar b/git-sonar index e09d6f4..615e053 100755 --- a/git-sonar +++ b/git-sonar @@ -71,12 +71,12 @@ precheck_status=$? # must be enclosed by a \001 byte (ASCII start of heading) at the start and a # \002 byte (ASCII start of text) at the end - some shells rely on this to # correctly track the length of their rendered prompt. -COLOR_GRAY="\001\\033[1;30m\002" -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_GRAY="\\001\\033[1;30m\\002" +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" FETCH_TIME="${GIT_SONAR_FETCH_TIME:-"300"}" -- cgit v1.2.3