SZEDER Gábor sze...@ira.uka.de wrote:
Makes sense, but the patch doesn't cover all cases, because
__git_ps1() can exit early
Thanks for looking at the patch. I feel quite silly for missing the other
return points :-( Follow-up patch on the way...
Tony.
--
f.anthony.n.finch d...@dotat.at
Hi,
Quoting Tony Finch d...@dotat.at:
If you have a prompt which displays the command exit status,
__git_ps1 without this change corrupts it, although it has
the correct value in the parent shell:
~/src/git (master) 0 $ set | grep ^PS1
PS1='\w$(__git_ps1) $? \$ '
If you have a prompt which displays the command exit status,
__git_ps1 without this change corrupts it, although it has
the correct value in the parent shell:
~/src/git (master) 0 $ set | grep ^PS1
PS1='\w$(__git_ps1) $? \$ '
~/src/git (master) 0 $ false
~/src/git
Tony Finch d...@dotat.at writes:
If you have a prompt which displays the command exit status,
__git_ps1 without this change corrupts it, although it has
the correct value in the parent shell:
~/src/git (master) 0 $ set | grep ^PS1
PS1='\w$(__git_ps1) $? \$ '
~/src/git
Junio C Hamano gits...@pobox.com wrote:
Yes. I wouldn't have spent 20 minutes experimenting with various
hypothetical use cases if the above were there in the first place.
Sorry for wasting your time, and thanks for reviewing the patch.
(I am so used to having $? in my prompt it took me ages
5 matches
Mail list logo