Use $PSStyle.Formatting.FormatAccent for Format-List and $PSStyle.Formatting.TableHeader for Format-Table output#14406
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. |
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
...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