diff options
| author | Matt Hunter <m@lfurio.us> | 2026-05-13 08:57:21 -0400 |
|---|---|---|
| committer | Matt Hunter <m@lfurio.us> | 2026-05-13 08:57:21 -0400 |
| commit | f8eaa83cb1ee52ae742e15d91d863247cc37e48a (patch) | |
| tree | 8a3a32cf39655271d5062849c254bfc21e801e6c | |
| parent | b41a90b58fe974cf3e2418c1b19c505d8d187371 (diff) | |
| download | git-sonar-f8eaa83cb1ee52ae742e15d91d863247cc37e48a.tar.gz git-sonar-f8eaa83cb1ee52ae742e15d91d863247cc37e48a.zip | |
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 <m@lfurio.us>
| -rwxr-xr-x | git-sonar | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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"}" |
