{"thread":{"id":"61091","subject":"Fix early wrapping when using bash with git-prompt.sh","startedAt":"2024-03-11T14:05:36Z","lastAt":"2024-03-11T14:05:36Z","messageCount":1,"participants":["Richard Quadling"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"490357","messageId":"CAKUjMCXik2565fok+z9=43DUcigbfqpWAEM-rfnO0rN=gS-Okw@mail.gmail.com","threadId":"61091","inReplyTo":null,"subject":"Fix early wrapping when using bash with git-prompt.sh","fromName":"Richard Quadling","fromEmail":"rquadling@gmail.com","sentAt":"2024-03-11T14:05:23Z","receivedAt":"2024-03-11T14:05:36Z","isPatch":false,"sender":{"key":"rquadling@gmail.com","avatar":"https://gravatar.com/avatar/4c385f24d4f13c86b9c3e54c61b2532189c1ffb3099a8e63738fd75de90b20ba?d=mp&s=160"},"body":"diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh\nindex 71f179cba3..6585164efe 100644\n--- a/contrib/completion/git-prompt.sh\n+++ b/contrib/completion/git-prompt.sh\n@@ -259,10 +259,10 @@ __git_ps1_colorize_gitstring ()\n  else\n  # Using \\001 and \\002 around colors is necessary to prevent\n  # issues with command line editing/browsing/completion!\n- local c_red=$'\\001\\e[31m\\002'\n- local c_green=$'\\001\\e[32m\\002'\n- local c_lblue=$'\\001\\e[1;34m\\002'\n- local c_clear=$'\\001\\e[0m\\002'\n+ local c_red=$'\\\\001\\e[31m\\\\002'\n+ local c_green=$'\\\\001\\e[32m\\\\002'\n+ local c_lblue=$'\\\\001\\e[1;34m\\\\002'\n+ local c_clear=$'\\\\001\\e[0m\\\\002'\n  fi\n  local bad_color=$c_red\n  local ok_color=$c_green\ndiff --git a/t/t9903-bash-prompt.sh b/t/t9903-bash-prompt.sh\nindex d667dda654..fc6fdd36c6 100755\n--- a/t/t9903-bash-prompt.sh\n+++ b/t/t9903-bash-prompt.sh\n@@ -13,10 +13,10 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n . \"$GIT_BUILD_DIR/contrib/completion/git-prompt.sh\"\n\n actual=\"$TRASH_DIRECTORY/actual\"\n-c_red='\\001\\e[31m\\002'\n-c_green='\\001\\e[32m\\002'\n-c_lblue='\\001\\e[1;34m\\002'\n-c_clear='\\001\\e[0m\\002'\n+c_red='\\\\001\\e[31m\\\\002'\n+c_green='\\\\001\\e[32m\\\\002'\n+c_lblue='\\\\001\\e[1;34m\\\\002'\n+c_clear='\\\\001\\e[0m\\\\002'\n\n test_expect_success 'setup for prompt tests' '\n  git init otherrepo &&\n"}]}