FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add `$env:__SuppressAnsiEscapeSequences` to control whether to have VT escape sequence in output by SteveL-MSFT · Pull Request #10814 · PowerShell/PowerShell · GitHub

Add $env:__SuppressAnsiEscapeSequences to control whether to have VT escape sequence in output - #10814

Merged
Travis Plunk (TravisEz13) merged 11 commits into
PowerShell:masterfrom
SteveL-MSFT:outputpreference
Oct 24, 2019
Merged

Add $env:__SuppressAnsiEscapeSequences to control whether to have VT escape sequence in output#10814
Travis Plunk (TravisEz13) merged 11 commits into
PowerShell:masterfrom
SteveL-MSFT:outputpreference

Conversation

Steve Lee (SteveL-MSFT) commented Oct 17, 2019
edited
Loading

Copy link
Copy Markdown
Member

PR Summary

After some discussion, we decided we want to spend more time on the design for customer facing use. Since we need this due to issues with AzDevOps pipelines having some rendering problems, we will make it an undocumented env var for now to use internally and revisit this post PS7 as part of #10811.

Introduce $env:__SuppressAnsiEscapeSequences to suppress VT escape sequences in their output. Updated Select-String, ConciseView, and Get-Error to respect this variable. Also added helper to retrieve VT escape sequences.

PR Checklist

update select-string cmdlet to support this
update ConciseView to support this
update Get-Error to support this
add tests
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 Oct 17, 2019

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

Steve Lee (SteveL-MSFT) changed the title Add $OutputPreference to control whether to have VT escape sequence in output Add $env:SuppressAnsiEscapeSequences to control whether to have VT escape sequence in output Oct 18, 2019
Steve Lee (SteveL-MSFT) changed the title Add $env:SuppressAnsiEscapeSequences to control whether to have VT escape sequence in output Add $env:__SuppressAnsiEscapeSequences to control whether to have VT escape sequence in output Oct 18, 2019

Copy link
Copy Markdown
Member Author

The remaining CodeFactor issue is wrong. Looks like it's looking at an older version of that source file.

ghost added the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Oct 18, 2019
Co-Authored-By: Joel Sallow (/u/ta11ow) <32407840+vexx32@users.noreply.github.com>
ghost removed the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Oct 18, 2019

Copy link
Copy Markdown
Member Author

Remaining Codacy issues are by-design

Comment thread .vsts-ci/linux.yml

Copy link
Copy Markdown
Contributor

Why not add a command line option instead?

It's somewhat common to support an option like --color [always|auto|never].

Copy link
Copy Markdown
Member

Jason Shirk (@lzybkr) This would cause this to be needed in a lot of places in testing.

Travis Plunk (TravisEz13) merged commit 4ff9924 into PowerShell:master Oct 24, 2019
Steve Lee (SteveL-MSFT) deleted the outputpreference branch October 24, 2019 20:42

Copy link
Copy Markdown
Member Author

Jason Shirk (@lzybkr) you mean cmdline option to pwsh?

Copy link
Copy Markdown
Contributor

Steve Lee (@SteveL-MSFT) - exactly. There are many tools that have such an option, mostly with the same syntax and options - here's a sampling:

Paul Higinbotham (PaulHigin) added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Nov 19, 2019

Copy link
Copy Markdown

🎉v7.0.0-preview.6 has been released which incorporates this pull request.:tada:

Handy links:

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

7 participants


Back | FazBrowse Home | New Git URL