-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Order of options / command name seems to matter #245
Comments
On version 3.3, I see the different ordering recommended in the Usage help text: $ test.py sync --defg=6
Options passed were 2 / 2
Usage: test.py sync [OPTIONS]
Error: no such option: --defg |
Duplicate of #108, see explanations there. |
Thanks. This issue could remain open to perhaps add a better error message, as I spent ages trying to figure this out. Change it to:
|
This is intentional. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello,
If I have options, it seems to be mandatory that they appear before the command name, as putting them after triggers a 'no such option' error.
Test code:
This doesn't work:
This works:
It may be that the options must come before the command, but then for example I see in one of the tests:
And I also have received a message before saying
Usage: <script> command [OPTIONS]
where the options were listed last in the list.Perhaps just a better error message instead of
no such option
?Thanks!
Mark
The text was updated successfully, but these errors were encountered: