PowerShellEditorServices icon indicating copy to clipboard operation
PowerShellEditorServices copied to clipboard

Host needs updating for $psStyle

Open jhoneill opened this issue 3 years ago • 4 comments

I filed an issue on the mail PowerShell project https://github.com/PowerShell/PowerShell/issues/16643 Basically hosts other than "ConsoleHost" - including the Visual Studio Code Host need to be updated so that when $PSStyle.OutputRendering is set to plaintext Ansi colours are not sent to the terminal

image

Above you can see the green row labels in the PowerShell Integrated Console. Below you can see they're mono in the PWSH console.

image

What I'm being told over there is that fix goes with the host. hence creating this one.

jhoneill avatar Dec 17 '21 17:12 jhoneill

Thanks for the bug report @jhoneill! We have a lot of work to do for the integrated console's host, especially with respect to the new PSStyle APIs.

andyleejordan avatar Jan 05 '22 22:01 andyleejordan

@andschwa See also https://github.com/PowerShell/PowerShell/issues/16643
There's a discussion going on about whether this should be in host, and if it reasonable to drop this work onto you.

jhoneill avatar Jan 06 '22 11:01 jhoneill

FWIW the latest preview seems to work in both Host and Ansi mode, except for exceptions: image image

Detailmode kind of works but clearly has issues: image

JustinGrote avatar Feb 21 '22 03:02 JustinGrote

Sweet, looks like things are improving! Patrick had the idea of redirecting the host's PrivateData field to the underlying console host, and not that I know much about this but it seems to have made more host things work?

andyleejordan avatar Feb 22 '22 17:02 andyleejordan