Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Select-String doesn't render VT (ANSI) escape sequences in its for-display output with input from external programs on Windows #18294

Copy link
Copy link
@mklement0

Description

@mklement0
Issue body actions

Prerequisites

Steps to reproduce

This is a regression from 7.2.6 and only happens:

  • on Windows (not on macOS; haven't tried on Linux)
  • in regular console windows (conhost.exe), not in Windows Terminal
  • with input from external programs
cmd /c echo foo | sls f

Expected behavior

foo should print with f highlighted, to indicate what part of the line matched.

Actual behavior

←[7mf←[0moo

That is, the VT escape sequences are mistakenly rendered as verbatim characters.

Error details

No response

Environment data

PowerShell Core 7.3.0-preview.8 on Windows 10 21H2, Windows 11 22H2

Visuals

No response

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Resolution-ExternalThe issue is caused by external component(s).The issue is caused by external component(s).

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.