-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Use $PSStyle.Formatting.FormatAccent for Format-List and $PSStyle.Formatting.TableHeader for Format-Table output #14406
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
Conversation
|
Remaining codefactor issues are existing issues |
|
Should table headers merit their own color definition? Or is it just Accent? |
|
@powercode that's a good question. Created #14429 to discuss. |
|
This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 15 days. It will be closed if no further activity occurs within 10 days of this comment. |
e2776d4 to
b3510f9
Compare
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
|
CodeFactor issues are in the existing code and tests and are by-design or won't fix. |
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
PaulHigin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
src/System.Management.Automation/FormatAndOutput/common/ListWriter.cs
Outdated
Show resolved
Hide resolved
test/powershell/Modules/Microsoft.PowerShell.Utility/Format-List.Tests.ps1
Outdated
Show resolved
Hide resolved
JamesWTruher
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
much tidier
...stem.Management.Automation/FormatAndOutput/DefaultFormatters/PowerShellCore_format_ps1xml.cs
Show resolved
Hide resolved
|
@iSazonov I believe this is ready to be merged and maybe we can get it in time for next preview |
|
🎉 Handy links: |
PR Summary
Leverage experimental feature
PSAnsiRenderingto use$PSStyle.Formatting.FormatAccentfor list property names (similar to coloring forGet-Error) and add$PSStyle.Formatting.TableHeaderfor custom coloring of table headers. Change is in ListWriter and TableWriter to add color.Example (note that the blue with white is just an example of customization):
PR Context
Fix #14429
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.PSAnsiRendering