Skip to content
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

feat: suggest fuzzy matches in case of unrecognized arguments #180

Merged
merged 3 commits into from
Nov 13, 2023

Conversation

aminya
Copy link
Contributor

@aminya aminya commented Nov 12, 2023

This improves the unrecognized argument messages by suggesting the best-matched option.

For example, if --bard is a defined option, and --bar is passed instead, --bard will be suggested in the error message:

Unrecognized argument: "--bar". Did you mean "--bard"?

@aminya aminya changed the title feat: suggest fuzzy matches in case on unrecognized arguments feat: suggest fuzzy matches in case of unrecognized arguments Nov 12, 2023
argh/src/lib.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@sadmac7000 sadmac7000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly this looks good. Please rebase and add your changes to account for help triggers as you suggested.

@sadmac7000 sadmac7000 merged commit 6149a1a into google:master Nov 13, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants