-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Committee-ReviewedPS-Committee has reviewed this and made a decisionPS-Committee has reviewed this and made a decisionIssue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bug
Description
Approved proposal #9348 (comment)
Motivation
Currently some cmdlets process objects using only current culture. Sometime we have Culture parameter to use another culture and CaseSensitive parameter to switch from default case-INsensitive behavior to case-sensitive.
Using only current culture and case-insensitivity is not a justified restriction.
In management tasks, it is often justified to use culture invariant and ordinal/ordinal-ignorecase comparisons.
Using non-culture (especially ordinal) allows to significantly increase the performance of operations like processing large log files.
Summary of the new feature/enhancement
For follow cmdlets:
- Compare-Object
- Group-Object
- Sort-Object
- Select-Object
- Select-String
implement:
- add Culture parameter if absent
- add Comparision (with values - Ordinal, OrdinalIgnoreCase, CurrentCulture, CurrentCultureIgnoreCase, InvariantCulture, InvariantCultureIgnoreCase and perhaps SimpleCaseFolding)
- deprecate CaseSensitive parameter
Proposed technical implementation details
- All this parameters is in ObjectCmdletBase class.
- To deprecate CaseSensitive parameter add
Parameter(DontShow = true). - Comparision parameter has priority over Culture parameter.
- Defaults (stay like now) is CurrentCulture for Culture parameter and CurrentCultureIgnoreCase for Comparison parameter. Although we might consider OrdinalIgnoreCase.
Additional information
Come from #8180 discussion.
mklement0
Metadata
Metadata
Assignees
Labels
Committee-ReviewedPS-Committee has reviewed this and made a decisionPS-Committee has reviewed this and made a decisionIssue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bug