-
-
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
Include docstring in missing argument error for MultiCommands #133
Comments
Sorry, I do not understand the request. What exactly do you want? |
I think he wants usage errors to show the full help? |
Ah, sorry for being unclear -- yes, untitaker puts it in a clearer way. When a subcommand is used wrong, I think it would be more logical to show the full help (as well as have an option for showing which argument is missing). I mentioned that this is the way Git does it, at least for some of its commands -- typing in the command
Which is the behavior I was looking for. If not default behavior, it would be at least logical to have the option without much hassle in configuration. |
I might be okay with having a way to make this optional. I'm not a fan of making this the default as if the help page is too long it's hard to see the error message. |
Maybe just a hint to call |
I'd like to know how to do this as well, can't quite figure it out with the latest Click. Would be nice to have an option to show help on missing arg; it would also be more consistent with how multi-commands handle this. |
👍 |
This prompt causes some confusion when there are required options for a command. Would like it if the full output of |
I would also love to see not just an error message, but the help page or a reference of how to get to the help page. If I do not use arguments (e.i. only commands and options) in my click program code and simply type the name of the cli tool I get the help page. However, if an argument is included in my code only the error is shown. |
I'd like this as well. Either show full help on missing argument or at least include something like "Use the --help option for more information.". Another option would be to allowing adding help to arguments that could provide additional information for the error message. |
The latter already happens to my knowledge (hint to use --help), but I might be misremembering
something.
…On Mon, Apr 23, 2018 at 09:48:32AM -0700, Dave wrote:
I'd like this as well. Either show full help on missing argument or at least include something like "Use the --help option for more information.".
Another option would be to allowing adding help to arguments that could provide additional information for the error message.
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#133 (comment)
|
Decision made to keep current "see --help" message in #502. |
Sample code:
Would like this output:
Not this output:
---- more verbose description of problem, if needed ----
Doing something like:
Prints usage instructions and
Error: Missing argument "..."
, but not the docstring specifying how to use the command 'remove'. To me, it makes more sense for the default behavior to include the docstring specifying how the function should be used for the missing argument error (the text that pops up for "python my_code.py remove --help"). This is the way Git functions.The text was updated successfully, but these errors were encountered: