◐ Shell
clean mode source ↗

Add -ExcludeProperty parameter to Format-* cmdlets by yotsuda · Pull Request #26514 · PowerShell/PowerShell

added 2 commits

November 23, 2025 19:34
Implements PowerShell#25043 for Format-Table and Format-List cmdlets.

Changes:
- Add PSPropertyExpressionFilter class for wildcard pattern matching
- Add -ExcludeProperty parameter to OuterFormatShapeCommandBase
- Implement property filtering in TableViewGenerator and ListViewGenerator
- Add tab completion support for -ExcludeProperty parameter
- Add conflict check for -View and -ExcludeProperty parameters
- Auto-apply '-Property *' when -ExcludeProperty is used without -Property
- Change ListViewGenerator to use 'parameters' instead of 'inputParameters'

Test Results:
- Format-Table: 61 tests passed (56 existing + 5 new)
- Format-List: 28 tests passed (23 existing + 5 new)
- All Format-* tests: 174 tests passed

Note: Format-Wide and Format-Custom will be implemented in subsequent commits.
Completes the implementation of ExcludeProperty parameter for all
Format-* cmdlets (Table, List, Wide, Custom) to provide consistency
with Select-Object's ExcludeProperty functionality.

Changes:
- Add ExcludeProperty parameter to Format-Wide and Format-Custom cmdlets
- Implement property filtering in FormatViewGenerator_Wide and FormatViewGenerator_Complex
- Add conflict check for -View and -ExcludeProperty parameters
- Auto-apply '-Property *' when -ExcludeProperty is used without -Property
- Change to use 'parameters' instead of 'inputParameters' for consistency
- Remove unused 'inputParameters' field from base class
- Add comprehensive test coverage (5 tests per cmdlet)

Test Results:
- All Format-* tests: 184 passed, 0 failed
- Format-Wide: 19 tests (14 existing + 5 new)
- Format-Custom: 5 new tests added
- Fix XML documentation to follow 'Gets or sets' convention
- Add blank lines before single-line comments
- Complete AutoSize property documentation summary

@iSazonov iSazonov added the CL-General

Indicates that a PR should be marked as a general cmdlet change in the Change Log

label

Nov 24, 2025

iSazonov

iSazonov

@yotsuda

…o issue-25043-format-table

iSazonov

iSazonov

iSazonov

iSazonov

@yotsuda

iSazonov

…o issue-25043-format-table

iSazonov

@yotsuda

iSazonov

…ies/Mshexpression.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

iSazonov

@yotsuda yotsuda deleted the issue-25043-format-table branch

December 5, 2025 05:05

SIRMARGIN pushed a commit to SIRMARGIN/PowerShell that referenced this pull request

Dec 12, 2025

kilasuit pushed a commit to kilasuit/PowerShell that referenced this pull request

Jan 2, 2026

JustinGrote pushed a commit to JustinGrote/PowerShell that referenced this pull request

Jun 2, 2026