microsoft / microsoft/winget-cli
PowerShell -MatchOption default should be EqualsCaseInsensitive
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Brief description of your issue
PowerShell is a case insensitive language, matching by case is opt-in. The MatchOption parameter default should be EqualsCaseInsensitive to have the standard PowerShell experience.
Steps to reproduce
Find-WinGetPackage -Id microsoft.powershell
Expected behavior
Only the matching Id is returned.
Find-WinGetPackage -Id microsoft.powershell
Name Id Version Source
---- -- ------- ------
PowerShell Microsoft.PowerShell 7.4.4.0 winget
Actual behavior
The preview package is also being returned which should not happen unless PowerShell wildcards are used to do a like comparison instead of equals.
Find-WinGetPackage -Id microsoft.powershell
Name Id Version Source
---- -- ------- ------
PowerShell Microsoft.PowerShell 7.4.4.0 winget
PowerShell Preview Microsoft.PowerShell.Preview 7.5.0.3 winget
Environment
Name Version
---- -------
Microsoft.WinGet.Client 1.8.1911
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Find-WinGetPackage -Id microsoft.powershell command and tracing the MatchOption parameter's default in the PowerShell command path. Confirm that the default performs case-insensitive equality, while wildcard input retains like-comparison behavior. Done means the command returns only Microsoft.PowerShell, not Microsoft.PowerShell.Preview.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, powershell
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100