Title: Select-String doesn't render VT (ANSI) escape sequences in its for-display output with input from external programs on Windows · Issue #18294 · PowerShell/PowerShell · GitHub
Open Graph Title: Select-String doesn't render VT (ANSI) escape sequences in its for-display output with input from external programs on Windows · Issue #18294 · PowerShell/PowerShell
X Title: Select-String doesn't render VT (ANSI) escape sequences in its for-display output with input from external programs on Windows · Issue #18294 · PowerShell/PowerShell
Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerShell 5.1 and PowerShell. Steps to reprodu...
Open Graph Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh...
X Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/18294
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Select-String doesn't render VT (ANSI) escape sequences in its for-display output with input from external programs on Windows","articleBody":"### Prerequisites\r\n\r\n- [X] Write a descriptive title.\r\n- [X] Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\r\n- [X] Search the existing issues.\r\n- [X] Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\r\n- [X] Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://docs.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).\r\n\r\n### Steps to reproduce\r\n\r\nThis is a regression from 7.2.6 and only happens:\r\n\r\n* on Windows (_not_ on macOS; haven't tried on Linux)\r\n* in regular console windows (`conhost.exe`), _not_ in Windows Terminal\r\n* with input from _external programs_\r\n\r\n```powershell\r\ncmd /c echo foo | sls f\r\n```\r\n\r\n\r\n### Expected behavior\r\n\r\n`foo` should print with `f` highlighted, to indicate what part of the line matched.\r\n\r\n\r\n### Actual behavior\r\n\r\n```console\r\n←[7mf←[0moo\r\n```\r\n\r\n\r\nThat is, the VT escape sequences are mistakenly rendered as verbatim characters.\r\n\r\n\r\n### Error details\r\n\r\n_No response_\r\n\r\n### Environment data\r\n\r\n```powershell\r\nPowerShell Core 7.3.0-preview.8 on Windows 10 21H2, Windows 11 22H2\r\n```\r\n\r\n\r\n### Visuals\r\n\r\n_No response_","author":{"url":"https://github.com/mklement0","@type":"Person","name":"mklement0"},"datePublished":"2022-10-14T15:01:24.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":10},"url":"https://github.com/18294/PowerShell/issues/18294"}
| 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:a07bce00-0fa6-cce0-236b-43a502fc3840 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A736:814DC:2505B23:31EE374:6A539653 |
| html-safe-nonce | 2a2590af5cb30386e118791429ac5202e30c538a10784266b828c16e8aff3ff3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNzM2OjgxNERDOjI1MDVCMjM6MzFFRTM3NDo2QTUzOTY1MyIsInZpc2l0b3JfaWQiOiI2NzkyNDY5NTM2Mzc0NTEzNDciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 4d6562f1f28bfe46d9a5be56d2f44ffa22b2e63ed79e3f161782433a391f69d5 |
| hovercard-subject-tag | issue:1409486572 |
| 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/18294/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1c3282a5ca0eeb2bc3596710b41a9e49e673e358532f23efbf1a7bdd13b38bc0/PowerShell/PowerShell/issues/18294 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1c3282a5ca0eeb2bc3596710b41a9e49e673e358532f23efbf1a7bdd13b38bc0/PowerShell/PowerShell/issues/18294 |
| og:image:alt | Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh... |
| 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