Environment data
PSReadline version: 2.0.0-beta3
Windows
This applies to all extant versions of Powershell.
Steps to reproduce or exception report
There are a number of user preferences that are PSReadline stores and restores across command executions; it is arguable as to whether it is PSReadline's job to do so.
Most of these things happen here.
| console.OutputEncoding=_singleton._initialOutputEncoding; |
| |
| boolIsValid(ConsoleColorcolor) |
| { |
| returncolor>=ConsoleColor.Black&&color<=ConsoleColor.White; |
| } |
| |
| if(IsValid(_singleton._initialForeground)){ |
| console.ForegroundColor=_singleton._initialForeground; |
| } |
| if(IsValid(_singleton._initialBackground)){ |
| console.BackgroundColor=_singleton._initialBackground; |
| } |
| if(!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) |
| { |
| Console.TreatControlCAsInput=oldControlCAsInput; |
| } |
Environment data
This applies to all extant versions of Powershell.
Steps to reproduce or exception report
There are a number of user preferences that are PSReadline stores and restores across command executions; it is arguable as to whether it is PSReadline's job to do so.
CSI 0 mwill reset the color to whatever the user requested as defaults[ ] the height of the legacy cursor (Bug Report: Cursor Shape setting is not persistent and reverts to legacy style microsoft/terminal#1145)<update: this is not a PSReadLine issue, see Cursor shape gets reverted to legacy style after hiding the cursor and then making it visible again in console window microsoft/terminal#4124>mitigation: use the standard VT sequences for cursor shapingMost of these things happen here.
PSReadLine/PSReadLine/ReadLine.cs
Lines 436 to 452 in f2f5531