Add $env:__SuppressAnsiEscapeSequences to control whether to have VT escape sequence in output#10814
Merged
TravisEz13 merged 11 commits intoPowerShell:masterfrom Oct 24, 2019
Merged
Conversation
update select-string cmdlet to support this update ConciseView to support this update Get-Error to support this add tests
PoshChan
reviewed
Oct 17, 2019
src/Microsoft.PowerShell.Commands.Utility/commands/utility/MatchString.cs
Show resolved
Hide resolved
PoshChan
reviewed
Oct 17, 2019
src/Microsoft.PowerShell.Commands.Utility/commands/utility/MatchString.cs
Show resolved
Hide resolved
iSazonov
reviewed
Oct 17, 2019
PaulHigin
suggested changes
Oct 17, 2019
src/Microsoft.PowerShell.Commands.Utility/commands/utility/MatchString.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Utility/commands/utility/MatchString.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Utility/commands/utility/MatchString.cs
Outdated
Show resolved
Hide resolved
$OutputPreference to control whether to have VT escape sequence in output$env:SuppressAnsiEscapeSequences to control whether to have VT escape sequence in output
$env:SuppressAnsiEscapeSequences to control whether to have VT escape sequence in output$env:__SuppressAnsiEscapeSequences to control whether to have VT escape sequence in output
Member
Author
|
The remaining CodeFactor issue is wrong. Looks like it's looking at an older version of that source file. |
vexx32
reviewed
Oct 18, 2019
TravisEz13
requested changes
Oct 18, 2019
...stem.Management.Automation/FormatAndOutput/DefaultFormatters/PowerShellCore_format_ps1xml.cs
Show resolved
Hide resolved
test/powershell/Modules/Microsoft.PowerShell.Utility/Select-String.Tests.ps1
Outdated
Show resolved
Hide resolved
Co-Authored-By: Joel Sallow (/u/ta11ow) <[email protected]>
Member
Author
|
Remaining Codacy issues are by-design |
PoshChan
reviewed
Oct 18, 2019
TravisEz13
approved these changes
Oct 21, 2019
Contributor
|
Why not add a command line option instead? It's somewhat common to support an option like |
Member
|
@lzybkr This would cause this to be needed in a lot of places in testing. |
Member
Author
|
@lzybkr you mean cmdline option to pwsh? |
Contributor
kilasuit
pushed a commit
to kilasuit/PowerShell
that referenced
this pull request
Nov 9, 2019
|
🎉 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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:__SuppressAnsiEscapeSequencesto suppress VT escape sequences in their output. UpdatedSelect-String,ConciseView, andGet-Errorto respect this variable. Also added helper to retrieve VT escape sequences.PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.$OutputPreferenceMicrosoftDocs/PowerShell-Docs#4947