PSReadline doesn't render ANSI escape sequences properly resulting in a unusable commnand line experience after executing git commands or the git bash shell.
PS version: 5.1.15063.674
PSReadline version: 2.0
os: 10.0.15063.0 (WinBuild.160101.0800)
PS file version: 10.0.15063.0 (WinBuild.160101.0800)
git log -1
This behavior appears if you invoke git bash or any other Cygwin based shell from within PowerShell. Once returned to the parent shell raw escape sequences are rendered on the command line as you type.
Oh, this is a PowerShell bug that I've worked around in my prompt but forgotten that I did that.
I'll have to add the workaround to PSReadLine.
My workaround is to add this to my prompt:
Set-ConsoleMode -ANSI
And this command comes from this gist.
@lzybkr Sweet! That helps a lot! 馃榾
Do you want me to close or leave this open for tracking purposes?
I need to leave it open so I don't forget to fix it.
BTW, this is also fixed in Windows PowerShell in the Fall Creators Update, but I'll still make a change to PSReadLine for folks who can't upgrade.
Most helpful comment
Oh, this is a PowerShell bug that I've worked around in my prompt but forgotten that I did that.
I'll have to add the workaround to PSReadLine.
My workaround is to add this to my prompt:
And this command comes from this gist.