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
Make the fuzzy searching flexible by passing in the fuzzy matcher #18270
Conversation
| public const int MinimumDistance = 5; | ||
| internal readonly uint MinimumDistance; | ||
|
|
||
| internal FuzzyMatcher(uint minimumDistance = 5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that we now expose setting the min distance in the cmdlet, I wonder if we should change this to 3 instead of 5 to get more reasonable results and likely a bucket 3 breaking change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It turns out we don't need to declare a default value for this parameter.
The -FuzzyMinimumDistance in Get-Command is 5 by default, are you suggesting changing it to 3? I think it makes sense, and will make the change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the default min distance back to 5 because the change caused a test to fail -- pwsh.exe is expected to return for pwsw on Windows by default. I guess we need to improve the fuzzy matcher somehow, to ignore the .exe extension
on the to-be-compared string when the reference string doesn't have .exe.
|
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? |


PR Summary
Make the fuzzy searching flexible by passing in the fuzzy matcher instead of using the
SearchResolutionOptions.PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.