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
conhost.exe console windows on Windows: cmdlets, e.g. Select-String, do not render VT (ANSI) escape sequences in their for-display output with direct input from native (external) programs #20898
The problem still exists in v7.4.0, and was introduced in 7.3.0-preview.2, according to @Hermel's findings.
To recap the repro steps: The problem occurs:
on Windows
in regular console windows (conhost.exe), not in Windows Terminal
with the VirtualTerminalLevel registry value in key HKEY_CURRENT_USER\Console NOT manually set to 1, i.e. either set to 0 or - as is the default - with the value not defined.
with input from external programs
# From a conhost.exe console window on Windows,# with the defaults (see note re `VirtualTerminalLevel` above).
cmd /c echo foo |Select-String f
Suboptimal workarounds:
Enclose the external-program call in (...)
Enable ANSI/VT support in conhost.exe console windows system-wide, via the registry:
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 @daxian-dbw
Expected behavior
foo
with f inverted, to highlight the matching part of the line.
Prerequisites
Steps to reproduce
Resolution-External.To recap the repro steps: The problem occurs:
conhost.exe), not in Windows TerminalVirtualTerminalLevelregistry value in keyHKEY_CURRENT_USER\ConsoleNOT manually set to1, i.e. either set to0or - as is the default - with the value not defined.Suboptimal workarounds:
(...)conhost.execonsole windows system-wide, via the registry:Set-ItemProperty HKCU:\Console VirtualTerminalLevel -Type DWORD 1conhost.execonsole windows on Windows #19101 (comment)Suspected cause, quoting @SeeminglyScience from #18294 (comment):
Expected behavior
foowith
finverted, to highlight the matching part of the line.Actual behavior
←[7mf←[0mooThat is, the VT escape sequence weren't rendered.
Error details
No response
Environment data
Visuals
No response