New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Out-String and Out-File keep string input unchanged
#17455
base: master
Are you sure you want to change the base?
Conversation
|
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? |
|
We need to update docs https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_ansi_terminals?view=powershell-7.2
|
LGTM! Thank you for making it still possible to retain formatting when output rendering is Ansi
|
@PowerShell/powershell-committee Need the committee to review the breaking change comparing with 7.2.x. In 7.2.x, When the passed-in object has formatting views applied to it, removing escape sequences from the resulted formatting text makes perfect sense when the output rendering option is However, when the passed-in objects are pure strings, those 2 cmdlets shouldn't make any changes to the string objects, because
I think the |


PR Summary
Fix #17452
The changes in this PR update the behavior of
Out-FileandOut-Stringregarding theRenderingOutputsetting to be the following:RenderingOutputsettingRenderingOutputsetting.This change is a breaking change to these 2 cmdlets' existing behavior regarding
RenderingOutput.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.