Your Windows build number: 10.0.18362.53
What you're doing and what's happening:
Open PowerShell (5.1.18362.1)
Set cursor shape to Solid Box (or any other non-legacy)
Cursor is solid
Execute command (e.g. cd, ls )
Cursor is back to legacy shape
CMD or WSL bash work as they should
Cursor shape should stay fixed.
If you do a Remove-Module PSReadline, then Powershell works as expected. I believe that this is a bug in their code, so I'll point you at lzybkr/PSReadLine to file the issue on them.
The root cause is that calling the SetConsoleCursorInfo API will reset the console's cursor size to whatever they've requested in that API call., and that it's currently not possible to set cursor shapes with that API.
Same here. Windows 19 1909.
Most helpful comment
If you do a
Remove-Module PSReadline, then Powershell works as expected. I believe that this is a bug in their code, so I'll point you at lzybkr/PSReadLine to file the issue on them.The root cause is that calling the
SetConsoleCursorInfoAPI will reset the console's cursor size to whatever they've requested in that API call., and that it's currently not possible to set cursor shapes with that API.