Skip to content

feat: improve GetMostSimilarFlags#657

Merged
boyter merged 1 commit intoboyter:masterfrom
apocelipes:feat-improve-similar
Nov 6, 2025
Merged

feat: improve GetMostSimilarFlags#657
boyter merged 1 commit intoboyter:masterfrom
apocelipes:feat-improve-similar

Conversation

@apocelipes
Copy link
Contributor

0.8 is somewhat too precise, making it difficult to match flags like --uloc. Therefore, we relaxed the precision to 0.75.

Additionally, for flags with three characters or fewer (1 < len(flag) <= 3), 0.75 is still insufficient to match them. Therefore, when encountering such flags, a -- prefix is now added before them. Increasing the string length enables effective matching of these flags.

Now almost all long flags can provide appropriate spelling suggestions.

@pr-insights pr-insights bot added L/complexity Low complexity M/size Normal or medium sized change labels Nov 5, 2025
@boyter boyter merged commit c681091 into boyter:master Nov 6, 2025
4 checks passed
@boyter
Copy link
Owner

boyter commented Nov 6, 2025

Nice.

@apocelipes apocelipes deleted the feat-improve-similar branch November 6, 2025 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L/complexity Low complexity M/size Normal or medium sized change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants