Skip to content

Use 'PlainText' when writing to a host that doesn't support VT#16092

Merged
adityapatwardhan merged 2 commits intoPowerShell:masterfrom
daxian-dbw:style
Sep 15, 2021
Merged

Use 'PlainText' when writing to a host that doesn't support VT#16092
adityapatwardhan merged 2 commits intoPowerShell:masterfrom
daxian-dbw:style

Conversation

@daxian-dbw
Copy link
Copy Markdown
Member

@daxian-dbw daxian-dbw commented Sep 14, 2021

PR Summary

Fix #15978

Update the ShouldOutputPlainText to take care of the situation when we are writing to a host that doesn't support VT.

I manually verified that it suppresses the VT sequences on legacy console host:

image

PR Checklist

@daxian-dbw daxian-dbw added CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log Backport-7.2.x-Consider labels Sep 14, 2021
Comment thread src/System.Management.Automation/engine/hostifaces/MshHostUserInterface.cs Outdated
@ghost ghost added Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept and removed Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept labels Sep 14, 2021
@ghost
Copy link
Copy Markdown

ghost commented Dec 16, 2021

🎉v7.3.0-preview.1 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backport-7.2.x-Done CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

$PSStyle.Formatting.TableHeader writes out the ANSI codes in a legacy console that doesn't support virtual terminal

4 participants