-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 levenshtein distance case insensitive. #10224
Conversation
When typing in a single character shortcut as a capital, it always returns `b` as the suggestion as every one-letter abbreviation is a lev distance 1 away from the capitalized one. By making the levenshtein distance case insensitive, the case-mismatched one-letter abbriviation (e.g. `C` to `c`) will be suggested, rather than `b`
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon. Please see the contribution instructions for more information. |
Thanks for the PR! Do you know if there's precedent for doing something like this? Do other levenshtein-using "did you mean" systems also do case-insensitive compares? |
I couldn't find any precedent for this, I just noticed that I accidentally had caps lock on and I found it weird that it would suggest |
Ok well at least seems reasonable to me. Can you add comments to the |
Will do! |
Looks good to me! @bors r+ |
📌 Commit f0992e3 has been approved by |
☀️ Test successful - checks-actions |
Update cargo 10 commits in fcef61230c3b6213b6b0d233a36ba4ebd1649ec3..358e79fe56fe374649275ca7aebaafd57ade0e8d 2021-12-17 02:30:38 +0000 to 2022-01-04 18:39:45 +0000 - Make rmeta_required no longer depend on whether timing is enabled (rust-lang/cargo#10254) - The first version of pull request template (rust-lang/cargo#10218) - Stabilize the `strip` profile option, now that rustc has stable `-C strip` (rust-lang/cargo#10088) - Update docs for windows ssh-agent. (rust-lang/cargo#10248) - Fix typo: substract -> subtract (rust-lang/cargo#10244) - timings: Fix tick mark alignment (rust-lang/cargo#10239) - Remove unused lifetimes (rust-lang/cargo#10238) - Make levenshtein distance case insensitive. (rust-lang/cargo#10224) - [docs] Adds basic CI yaml for GitHub Actions (rust-lang/cargo#10212) - Add function for parsing already-read manifest (rust-lang/cargo#10209)
When typing in a single character shortcut as a capital, it always
returns
b
as the suggestion as every one-letter abbreviationis a lev distance 1 away from the capitalized one.
By making the levenshtein distance case insensitive, the case-mismatched
one-letter abbriviation (e.g.
C
toc
) will be suggested, ratherthan
b