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
$PSStyle cause issues in the PowerShell Console #14435
Hmm I can't repro the color leaking. (Edit: Didn't have the experimental feature enabled) As for the style not taking effect, yeah every custom host will need to implement this themselves.
It would be nice if ConsoleHost was redesigned somewhat to be inheritable. That doesn't really help PSES and such right now unless it's polyfilled but it would save a lot of headache in the future.
I think we need a bit more platform-oriented thinking here
Yeah I'm with ya there. I'm not really sure how though, those streams don't make it to anything like the formatter where this could be processed in a host agnostic way. In most cases MshCommandRuntime.WriteVerbose goes directly to PSHostUserInterface.WriteVerboseLine.
Another challenge is that escape sequences do not do much to describe what a GUI host should do. I didn't see the PR at the time, but if I did I would have recommended removing the customizations of the other streams until this was fleshed out a little bit more.
changed the title [-]$PSStyle cause issues in the VSCode PowerShell extension Integrated Console[/-][+]$PSStyle cause issues in the PowerShell Console[/+]on Feb 2, 2021
Activity
TylerLeonhardt commentedon Dec 16, 2020
Also worth looking at .NET Interactive - another pshost.
SeeminglyScience commentedon Dec 16, 2020
Hmm I can't repro the color leaking.(Edit: Didn't have the experimental feature enabled) As for the style not taking effect, yeah every custom host will need to implement this themselves.It would be nice if
ConsoleHostwas redesigned somewhat to be inheritable. That doesn't really help PSES and such right now unless it's polyfilled but it would save a lot of headache in the future.rjmholt commentedon Dec 16, 2020
I think we need a bit more platform-oriented thinking here
SeeminglyScience commentedon Dec 16, 2020
Yeah I'm with ya there. I'm not really sure how though, those streams don't make it to anything like the formatter where this could be processed in a host agnostic way. In most cases
MshCommandRuntime.WriteVerbosegoes directly toPSHostUserInterface.WriteVerboseLine.Another challenge is that escape sequences do not do much to describe what a GUI host should do. I didn't see the PR at the time, but if I did I would have recommended removing the customizations of the other streams until this was fleshed out a little bit more.
[-]$PSStyle cause issues in the VSCode PowerShell extension Integrated Console[/-][+]$PSStyle cause issues in the PowerShell Console[/+]SteveL-MSFT commentedon Aug 4, 2021
This seems to be working fine with 7.2-preview.8
SteveL-MSFT commentedon Aug 4, 2021
I think this is a dupe of #14506 which was already fixed
rjmholt commentedon Aug 4, 2021
This doesn't produce the magenta background, but otherwise things seem to be working.