-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
chore: migrate to leven for command suggestion #5166
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
Conversation
Try the two commands: |
if (leven(cmd, unknownCommand) < 2) { This would do that. |
But it's not the best fix |
The ideal algorithm is to find the closest command, regardless of the distance. (You can set a threshold to stop suggesting when even the closest command is too unrelated, though) |
What kind of change does this PR introduce? (check at least one)
closes #5164
Does this PR introduce a breaking change? (check one)
Other information:
N/A