Skip to content
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

Add -CaseInsensitive switch parameter to Select-Object & Get-Unique cmdlet documentation #10097

Closed
2 tasks done
ArmaanMcleod opened this issue May 26, 2023 · 0 comments · Fixed by #10349
Closed
2 tasks done
Assignees
Labels
area-utility Area - Microsoft.PowerShell.Utility module issue-doc-idea Issue - request for new content
Milestone

Comments

@ArmaanMcleod
Copy link

Prerequisites

  • Existing Issue: Search the existing issues for this repository. If there is an issue that fits your needs do not file a new one. Subscribe, react, or comment on that issue instead.
  • Descriptive Title: Write the title for this issue as a short synopsis. If possible, provide context. For example, "Document new Get-Foo cmdlet" instead of "New cmdlet."

Summary

Added -CaseInsensitive switch parameter to Select-Object & Get-Unique cmdlets.

The Select-Object and Get-Unique cmdlets currently do case-sensitive string comparison when filtering unique items, and don't allow the user to override this behaviour and use case-insensitive comparison.

This helps users do case-insensitive string comparison when using these cmdlets.

Details

Examples

Select-Object -Unique

> "derp", "Derp" | Select-Object -Unique
derp
Derp

> "derp", "Derp" | Select-Object -Unique -CaseInsensitive
derp

Get-Unique

> "aa", "Aa", "bb", "Bb" | Get-Unique
aa
Aa
bb
Bb

> "aa", "Aa", "bb", "Bb" | Get-Unique -AsString -CaseInsensitive
aa
bb

> "aa", "Aa", "bb", "Bb" | Get-Unique -CaseInsensitive
aa
bb

Articles

  • reference/7.4/Microsoft.PowerShell.Utility/Select-Object.md
  • reference/7.4/Microsoft.PowerShell.Utility/Get-Unique.md

Related Source Pull Requests

Related Source Issues

@ArmaanMcleod ArmaanMcleod added issue-doc-idea Issue - request for new content needs-triage Waiting - Needs triage labels May 26, 2023
@sdwheeler sdwheeler added area-utility Area - Microsoft.PowerShell.Utility module hold-for-pr Waiting - for PR merge hold-for-release Waiting - for next release and removed needs-triage Waiting - Needs triage labels May 26, 2023
@michaeltlombardi michaeltlombardi added this to the Future milestone Jun 5, 2023
@sdwheeler sdwheeler modified the milestones: Future, 7.4 Jul 25, 2023
@sdwheeler sdwheeler removed the hold-for-pr Waiting - for PR merge label Jul 25, 2023
@sdwheeler sdwheeler self-assigned this Aug 18, 2023
sdwheeler added a commit that referenced this issue Aug 23, 2023
* Add CaseInsensitive parameter for 7.4-p5

* Feedback
@sdwheeler sdwheeler removed the hold-for-release Waiting - for next release label Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-utility Area - Microsoft.PowerShell.Utility module issue-doc-idea Issue - request for new content
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants