Open ThomasNieto opened 3 months ago
[Policy] PowerShell
The default behavior is to use a Substring search, which matches the WinGet CLI
[Policy] Issue Feature
@ThomasNieto, thanks for creating the issue. I'm still learning the PowerShell way and wouldn't have been likely to catch that once since I'm so used to the CLI experience. We should look to pass the right parameters via PowerShell to the COM API so the PowerShell experience matches the expectations here.
While testing some more it would be ideal to use the PowerShell way and use PowerShell wildcards. Right now even with the proposed setting it still returns other results other than the case insensitive match.
There is a class called WildcardPattern
that you can use to ensure the match to the PowerShell way.
Brief description of your issue
PowerShell is a case insensitive language, matching by case is opt-in. The
MatchOption
parameter default should beEqualsCaseInsensitive
to have the standard PowerShell experience.Steps to reproduce
Expected behavior
Only the matching Id is returned.
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.
Environment