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
Select-String doesn't render VT (ANSI) escape sequences in its for-display output with input from external programs on Windows #18294
changed the title [-]Select-String doesn't render VT (ANSI) escape sequences with input from external programs on Windows[/-][+]Select-String doesn't render VT (ANSI) escape sequences in its for-display output with input from external programs on Windows[/+]on Oct 14, 2022
Strange, Patrick Meinecke (@SeeminglyScience): I do see it in Windows 11 too, albeit only in conhost.exe windows, not in Windows Terminal - I've updated the initial post to clarify.
Yes, (cmd /c echo foo | sls f) (the equivalent of your commands) makes the problem go away (the VT sequences then render as expected).
Strange, Patrick Meinecke (@SeeminglyScience): I do see it in Windows 11 too, albeit only in conhost.exe windows, not in Windows Terminal - I've updated the initial post to clarify.
That's very interesting, FWIW I did try both conhost and WT and couldn't repro in either
Mysterious (to recap: 7.3.0-preview.8, conhost.exe window, $PSStyle.OutputRendering at its default, 'Host', W10 21H2 and W11 22H2). Perhaps others can report what they get.
2261.232 (I wouldn't expect it to make a difference, but for the record it is an ARM build running in a VMWare Fusion VM on an M1 Mac; however, the Windows 10 VM runs on an Intel Mac).
Steve Lee (@SteveL-MSFT), glad to hear that you see it too, but note that it probably isn'tconhost.exe, given that the same command works fine in v7.2.6 - or do you see the symptom there too?
I would guess it's related to #16612 but I've looked it over and I can't easily see how. We should be re-enabling VT more often rather than less, so something is a little off for sure. /cc Dongbo Wang (@daxian-dbw)
Activity
[-]Select-String doesn't render VT (ANSI) escape sequences with input from external programs on Windows[/-][+]Select-String doesn't render VT (ANSI) escape sequences in its for-display output with input from external programs on Windows[/+]SeeminglyScience commentedon Oct 14, 2022
Interestingly I can't repro this on Windows 11. Can anyone else on 10 try?
I would assume this has to do with console modes. Michael Klement (@mklement0) can you see if:
has the same effect?
mklement0 commentedon Oct 14, 2022
Strange, Patrick Meinecke (@SeeminglyScience): I do see it in Windows 11 too, albeit only in
conhost.exewindows, not in Windows Terminal - I've updated the initial post to clarify.Yes,
(cmd /c echo foo | sls f)(the equivalent of your commands) makes the problem go away (the VT sequences then render as expected).SeeminglyScience commentedon Oct 14, 2022
That's very interesting, FWIW I did try both
conhostand WT and couldn't repro in eithermklement0 commentedon Oct 14, 2022
Mysterious (to recap: 7.3.0-preview.8,
conhost.exewindow,$PSStyle.OutputRenderingat its default,'Host', W10 21H2 and W11 22H2). Perhaps others can report what they get.SeeminglyScience commentedon Oct 14, 2022
What's your build number for w11? I'm on 22621.674 (22H2 Oct 2022) (last bit only appears in
winverit seems)mklement0 commentedon Oct 14, 2022
2261.232(I wouldn't expect it to make a difference, but for the record it is an ARM build running in a VMWare Fusion VM on an M1 Mac; however, the Windows 10 VM runs on an Intel Mac).SteveL-MSFT commentedon Oct 17, 2022
I'm able to repro this. However, I think it's a problem with conhost:
It appears that the right sequence is emitted, but conhost isn't rendering it.
mklement0 commentedon Oct 17, 2022
Steve Lee (@SteveL-MSFT), glad to hear that you see it too, but note that it probably isn't
conhost.exe, given that the same command works fine in v7.2.6 - or do you see the symptom there too?SeeminglyScience commentedon Oct 17, 2022
I would guess it's related to #16612 but I've looked it over and I can't easily see how. We should be re-enabling VT more often rather than less, so something is a little off for sure. /cc Dongbo Wang (@daxian-dbw)