-
Notifications
You must be signed in to change notification settings - Fork 9
Unnecessary blank lines in "Unknown option" error #62
Comments
Printing the app name before the error, like |
I think I cannot do |
@moll Do you think the program name should be an option or derived from the usage section? Or both, where configuration would take precedence? That leads into something else, I think this should be an "incoherent specification" error:
because the program name is said to be "foo" and "bar". What do you think? |
with the lastest commit to
It's not configurable yet, however. I wonder if it even needs to be now. |
This has been merged as of 005c826 and addresses all of the issues raised in the OP. If we want to make this configurable, we should track this in a new issue. |
@moll you can try the new behaviour now at https://felixschl.github.io/neodoc (it's running a preview version of v0.8.0. feedback would be much appreciated) |
Hey,
I modeled my usage text according to GNU conventions:
Calling
Neodoc.run
with it and passing an invalid option on the CLI, you'll get back an extraneous blank line (2 in total):I take it's because of the blank line after
Usage:
.I'd go with either zero, one or follow GNU utils or Git that print the error above the Usage line:
Cheers
The text was updated successfully, but these errors were encountered: