You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Clear-Host causes cursor position state issues with PSReadLine #2408
changed the title [-]Split-Path -Path $PSScriptRoot -Parent returns file name[/-][+]Clear-Host causes cursor position state issues with PSReadLine[/+]on Jan 10, 2020
Activity
TylerLeonhardt commentedon Jan 10, 2020
Ok so this is a very interesting issue. For starters:
Your script is running properly and the
Split-Pathcmdlet is working fineThe problem here is purely visual output and is related to the PSReadLine support in the PS Integrated Console.
To prove it to you, you can do the following things:
"powershell.integratedConsole.useLegacyReadLine": trueand run it again. { ... } > foo.txtThe bug shows up after you run
Clear-Hostso there's some state that PSReadLine & the PowerShell extension share that is not being updated properly.[-]Split-Path -Path $PSScriptRoot -Parent returns file name[/-][+]Clear-Host causes cursor position state issues with PSReadLine[/+]TylerLeonhardt commentedon Jan 11, 2020
Yeah the prompt change is something I've noticed when doing console debugging in PowerShell as well so that's likely an issue there.
Did you try the first suggestion? Hitting enter until it scrolls? Curious if that works for you.