Merge branch 'rh/prompt-pcmode-avoid-eval-on-refname'
* rh/prompt-pcmode-avoid-eval-on-refname: git-prompt.sh: don't assume the shell expands the value of PS1
This commit is contained in:
@ -578,12 +578,12 @@ test_expect_success 'prompt - bash color pc mode - untracked files status indica
|
||||
'
|
||||
|
||||
test_expect_success 'prompt - zsh color pc mode' '
|
||||
printf "BEFORE: (%%F{green}\${__git_ps1_branch_name}%%f):AFTER\\nmaster" >expected &&
|
||||
printf "BEFORE: (%%F{green}master%%f):AFTER" >expected &&
|
||||
(
|
||||
ZSH_VERSION=5.0.0 &&
|
||||
GIT_PS1_SHOWCOLORHINTS=y &&
|
||||
__git_ps1 "BEFORE:" ":AFTER" >"$actual"
|
||||
printf "%s\\n%s" "$PS1" "${__git_ps1_branch_name}" >"$actual"
|
||||
__git_ps1 "BEFORE:" ":AFTER" &&
|
||||
printf "%s" "$PS1" >"$actual"
|
||||
) &&
|
||||
test_cmp expected "$actual"
|
||||
'
|
||||
|
Reference in New Issue
Block a user