@@ -541,7 +541,7 @@ test_expect_success 'prompt - pc mode' '
541
541
'
542
542
543
543
test_expect_success ' prompt - bash color pc mode - branch name' '
544
- printf "BEFORE: (\${__git_ps1_branch_name}):AFTER\\n${c_green}main ${c_clear}" >expected &&
544
+ printf "BEFORE: (${c_green}\${__git_ps1_branch_name} ${c_clear}):AFTER\\nmain " >expected &&
545
545
(
546
546
GIT_PS1_SHOWCOLORHINTS=y &&
547
547
__git_ps1 "BEFORE:" ":AFTER" >"$actual" &&
@@ -551,7 +551,7 @@ test_expect_success 'prompt - bash color pc mode - branch name' '
551
551
'
552
552
553
553
test_expect_success ' prompt - bash color pc mode - detached head' '
554
- printf "BEFORE: (\${__git_ps1_branch_name}):AFTER\\n${c_red} (%s...)"${c_clear} $(git log -1 --format="%h" b1^) >expected &&
554
+ printf "BEFORE: (${c_red} \${__git_ps1_branch_name}${c_clear} ):AFTER\\n(%s...)" $(git log -1 --format="%h" b1^) >expected &&
555
555
git checkout b1^ &&
556
556
test_when_finished "git checkout main" &&
557
557
(
@@ -563,7 +563,7 @@ test_expect_success 'prompt - bash color pc mode - detached head' '
563
563
'
564
564
565
565
test_expect_success ' prompt - bash color pc mode - dirty status indicator - dirty worktree' '
566
- printf "BEFORE: (\${__git_ps1_branch_name} ${c_red}*${c_clear}):AFTER\\n${c_green}main${c_clear} " >expected &&
566
+ printf "BEFORE: (${c_green} \${__git_ps1_branch_name}${c_clear} ${c_red}*${c_clear}):AFTER\\nmain " >expected &&
567
567
echo "dirty" >file &&
568
568
test_when_finished "git reset --hard" &&
569
569
(
@@ -576,7 +576,7 @@ test_expect_success 'prompt - bash color pc mode - dirty status indicator - dirt
576
576
'
577
577
578
578
test_expect_success ' prompt - bash color pc mode - dirty status indicator - dirty index' '
579
- printf "BEFORE: (\${__git_ps1_branch_name} ${c_green}+${c_clear}):AFTER\\n${c_green}main${c_clear} " >expected &&
579
+ printf "BEFORE: (${c_green} \${__git_ps1_branch_name}${c_clear} ${c_green}+${c_clear}):AFTER\\nmain " >expected &&
580
580
echo "dirty" >file &&
581
581
test_when_finished "git reset --hard" &&
582
582
git add -u &&
@@ -590,7 +590,7 @@ test_expect_success 'prompt - bash color pc mode - dirty status indicator - dirt
590
590
'
591
591
592
592
test_expect_success ' prompt - bash color pc mode - dirty status indicator - dirty index and worktree' '
593
- printf "BEFORE: (\${__git_ps1_branch_name} ${c_red}*${c_clear}${c_green}+${c_clear}):AFTER\\n${c_green}main${c_clear} " >expected &&
593
+ printf "BEFORE: (${c_green} \${__git_ps1_branch_name}${c_clear} ${c_red}*${c_clear}${c_green}+${c_clear}):AFTER\\nmain " >expected &&
594
594
echo "dirty index" >file &&
595
595
test_when_finished "git reset --hard" &&
596
596
git add -u &&
@@ -605,7 +605,7 @@ test_expect_success 'prompt - bash color pc mode - dirty status indicator - dirt
605
605
'
606
606
607
607
test_expect_success ' prompt - bash color pc mode - dirty status indicator - before root commit' '
608
- printf "BEFORE: (\${__git_ps1_branch_name} ${c_green}#${c_clear}):AFTER\\n${c_green}main${c_clear} " >expected &&
608
+ printf "BEFORE: (${c_green} \${__git_ps1_branch_name}${c_clear} ${c_green}#${c_clear}):AFTER\\nmain " >expected &&
609
609
(
610
610
GIT_PS1_SHOWDIRTYSTATE=y &&
611
611
GIT_PS1_SHOWCOLORHINTS=y &&
@@ -617,7 +617,7 @@ test_expect_success 'prompt - bash color pc mode - dirty status indicator - befo
617
617
'
618
618
619
619
test_expect_success ' prompt - bash color pc mode - inside .git directory' '
620
- printf "BEFORE: (\${__git_ps1_branch_name}):AFTER\\n${c_green}GIT_DIR! ${c_clear}" >expected &&
620
+ printf "BEFORE: (${c_green}\${__git_ps1_branch_name} ${c_clear}):AFTER\\nGIT_DIR! " >expected &&
621
621
echo "dirty" >file &&
622
622
test_when_finished "git reset --hard" &&
623
623
(
@@ -631,7 +631,7 @@ test_expect_success 'prompt - bash color pc mode - inside .git directory' '
631
631
'
632
632
633
633
test_expect_success ' prompt - bash color pc mode - stash status indicator' '
634
- printf "BEFORE: (\${__git_ps1_branch_name} ${c_lblue}\$${c_clear}):AFTER\\n${c_green}main${c_clear} " >expected &&
634
+ printf "BEFORE: (${c_green} \${__git_ps1_branch_name}${c_clear} ${c_lblue}\$${c_clear}):AFTER\\nmain " >expected &&
635
635
echo 2 >file &&
636
636
git stash &&
637
637
test_when_finished "git stash drop" &&
@@ -645,7 +645,7 @@ test_expect_success 'prompt - bash color pc mode - stash status indicator' '
645
645
'
646
646
647
647
test_expect_success ' prompt - bash color pc mode - untracked files status indicator' '
648
- printf "BEFORE: (\${__git_ps1_branch_name} ${c_red}%%${c_clear}):AFTER\\n${c_green}main${c_clear} " >expected &&
648
+ printf "BEFORE: (${c_green} \${__git_ps1_branch_name}${c_clear} ${c_red}%%${c_clear}):AFTER\\nmain " >expected &&
649
649
(
650
650
GIT_PS1_SHOWUNTRACKEDFILES=y &&
651
651
GIT_PS1_SHOWCOLORHINTS=y &&
0 commit comments