-
-
Notifications
You must be signed in to change notification settings - Fork 783
✨ Add optional parameter to enable command suggestions #1371
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
base: master
Are you sure you want to change the base?
✨ Add optional parameter to enable command suggestions #1371
Conversation
📝 Docs previewLast commit 80f199d at: https://65ce4615.typertiangolo.pages.dev Modified Pages |
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 think this is a great feature to have, and I would have even wanted to enable this by default. But to minimize unexpected impact on users it probably makes sense to have it disabled by default as you suggest.
Love all the tests, went through it all and all looked good. Addition to the tutorial is perfect and the added code is minimal and clean.
Could really only find the smallest of nitpicks, but happy to approve either way. 😉
Co-authored-by: Sofie Van Landeghem <[email protected]>
This PR adds a common CLI feature as optional to Typer (i.e. off by default), allowing users to enable command suggestions for typos (similar to the recently added
suggest_on_error
feature inargparse
) without any additional dependency.Usage
If a user were to type
crate
instead ofcreate
, they would then see an error message like so: