If the prompt-string character that is turned red to signal parser errors is colored, the color isn't restored on resolving the error. #4716
Labels
Needs-Triage 🔍
It's a new issue that core contributor team needs to triage.
Prerequisites
Exception report
N/A
Screenshot
On resolving the parser error,
>
is printed with the default foreground color rather than in green:Environment data
Steps to reproduce
Define the following prompt, which prints
foo
followed by a green>
char. (and a space):Type a single quote character, which provokes a parser error and turns the
>
red.Type a closing quote to resolve the parser error.
Presumably related:
Expected behavior
On resolving the parser error, the
>
should be restored with its original color, i.e. green.Actual behavior
On resolving the parser error, the
>
is restored with the default foreground color.Note that using PSReadLine seemingly does recognize the
>
despite being surrounded by ANSI escape sequences, but makes no attempt to preserve its color.Note that trying something like
Set-PSReadLineOption -PromptText "$($PsStyle.foreground.Green)>$($PSStyle.Reset) "
does not help - PSReadLine doesn't recognize it as part of the prompt string.The text was updated successfully, but these errors were encountered: