PowerShell-Docs
PowerShell-Docs copied to clipboard
New $PSStyle.Formatting.CustomTableHeader decoration
Prerequisites
- [X] Write a descriptive title.
- [X] Search the existing issues.
Summary of the new feature or changed behavior
An additional $PSStyle.Formatting.CustomTableHeader
is added to differentiate in the table header labels that don't match a property name. For example:
get-process pwsh
NPM(K) PM(M) WS(M) CPU(s) Id SI ProcessName
------ ----- ----- ------ -- -- -----------
0 0.00 13.33 6.21 3500 …98 pwsh
0 0.00 46.53 0.60 10967 …67 pwsh
0 0.00 40.02 35.83 64003 …02 pwsh
0 0.00 12.19 35.44 65597 …97 pwsh
The first 4 columns are not actual property names you can access on the process object. But users can get confused as they expect them to be accessible via dot-notation if they store the object in a variable or use select-object
and doesn't find that property.
List of articles that need to be updated
- https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_ansi_terminals?view=powershell-7.2
Link to related PR in PowerShell/PowerShell repo
- https://github.com/PowerShell/PowerShell/pull/17346
Link to related Issues in PowerShell/PowerShell repo
none