Title: Consider implicitly activating VT / ANSI escape-sequence support for native programs in `conhost.exe` console windows on Windows · Issue #19101 · PowerShell/PowerShell · GitHub
Open Graph Title: Consider implicitly activating VT / ANSI escape-sequence support for native programs in `conhost.exe` console windows on Windows · Issue #19101 · PowerShell/PowerShell
X Title: Consider implicitly activating VT / ANSI escape-sequence support for native programs in `conhost.exe` console windows on Windows · Issue #19101 · PowerShell/PowerShell
Description: Summary of the new feature / enhancement The following environments on Windows already automatically (and invariably) support VT / ANSI escape sequences in output from native (external) programs, notably to produce colored output. Window...
Open Graph Description: Summary of the new feature / enhancement The following environments on Windows already automatically (and invariably) support VT / ANSI escape sequences in output from native (external) programs, n...
X Description: Summary of the new feature / enhancement The following environments on Windows already automatically (and invariably) support VT / ANSI escape sequences in output from native (external) programs, n...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/19101
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Consider implicitly activating VT / ANSI escape-sequence support for native programs in `conhost.exe` console windows on Windows","articleBody":"### Summary of the new feature / enhancement\r\n\r\nThe following environments on Windows already automatically (and invariably) support VT / ANSI escape sequences in output from native (external) programs, notably to produce colored output.\r\n\r\n* Windows Terminal\r\n* Visual Studio Code's integrated terminal.\r\n\r\nBy contrast, in console windows (provided by `conhost.exe`) the support depends on a _registry setting_ that is OFF by default (`Set-ItemProperty HKCU:\\Console VirtualTerminalLevel -Type DWORD 1` enables it).\r\n(Note: Some CLIs explicitly enable VT support _for themselves_, using the WinAPI, `pwsh.exe` and `wsl.exe` being examples; these do _not_ depend on the registry setting, but all other ones do.)\r\n\r\nMaking VT support _implicit_ (independent of the registry setting) even for native programs seems worthwhile, to align with user expectations and a modern terminal user experience.\r\n\r\nGiven that the change only affects how data is _displayed_, there shouldn't be a backward-compatibility concern.\r\n\r\nImplicitly enabling support would also:\r\n\r\n* simplify the code, given that VT support is currently turned off and on demand, given that it must be enabled for _PowerShell_ commands.\r\n\r\n* remove bugs in that context, such as #18771 (which was inappropriately closed; a perhaps better repro is `cmd /c | Select-String Microsoft`)\r\n\r\n\r\n### Proposed technical implementation details (optional)\r\n\r\n_No response_","author":{"url":"https://github.com/mklement0","@type":"Person","name":"mklement0"},"datePublished":"2023-02-03T20:05:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":48},"url":"https://github.com/19101/PowerShell/issues/19101"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7852633e-6b40-f39f-32d1-ea5eba4344ed |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EA18:15F1A6:1BE0BD2:256CD70:6A5363DA |
| html-safe-nonce | 98b219eefbcd6c95fd73015f0fa2db1851efbc37aff746906bd27e2e29a6e615 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQTE4OjE1RjFBNjoxQkUwQkQyOjI1NkNENzA6NkE1MzYzREEiLCJ2aXNpdG9yX2lkIjoiMzgwNTAxNjI2NjM4MjczMDIwMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | dcb42fae39ede478c1f77557a15e7a07b93df0a455939790979c1d9a56f713f7 |
| hovercard-subject-tag | issue:1570376465 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/19101/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ada36499ac19b040f1cb68baef6d9141449a2fb8787250498f1890f12b637107/PowerShell/PowerShell/issues/19101 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ada36499ac19b040f1cb68baef6d9141449a2fb8787250498f1890f12b637107/PowerShell/PowerShell/issues/19101 |
| og:image:alt | Summary of the new feature / enhancement The following environments on Windows already automatically (and invariably) support VT / ANSI escape sequences in output from native (external) programs, n... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mklement0 |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width