-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
The "this option should be documented" step needs improvement #37
Comments
While you are in there, forcing the descriptive text to start with at least a 3-letter word is fail. Help syntax starting with a one or two-letter word should be possible. |
I think it just requires that the help text is more than three characters Dave On Fri, Dec 7, 2012 at 6:07 PM, Tamara Temple notifications@github.heygears.comwrote:
|
i wish:
That means you have to have at least 3 alnum characters to start the My description started with "Do not (blah blah)" and it caused the step to On Fri, Dec 7, 2012 at 6:20 PM, David Copeland notifications@github.heygears.comwrote:
--Tamara May you never see a stranger's face in the mirror. |
This should now be in 1.2.3 and remove the constraint of a three-letter word - don't know how I missed that, but thanks for the bug report! |
Hey @davetron5000, The changes in 3ab4088 have broken "compatibility" with Trollop-style command-line options: Options:
--verbose, -V: Run verbosely
--version, -v: Print version and exit
--help, -h: Show this message Before that commit, you could use the following examples table (cheating a wee bit, but at least it worked): And the following options should be documented:
| --verbose, -V: |
| --version, -v: |
| --help, -h: | ... but that no longer works. None of the suggested alternatives work either: And the following options should be documented:
| --verbose, -V |
| --version, -v |
| --help, -h | (the options get split on the "," but still no joy) And the following options should be documented:
| --verbose | -V |
| --version | -v |
| --help | -h | (still doesn't work because of the ":" in the output AFAICT) I'll submit a pull request but thought I'd give you a heads up... |
Interesting - you are using this step to tdd a trollop app? Talk about unintended uses! :) Yeah, this step is still pretty badly concieved, so anything you can do to improve it is good - it was designed around exactly what methodone/OptionParser produces, but if we can make it a bit more flexible, that's cool with me. |
... described here: davetron5000/optparse-plus#37 (comment)
It doesn't work when the terms contain regex-y characters (e.g. for
--[no-]foo
), and it gets cumbersome when you have multiple options. I think it needs to work like so:Here,
-c
and--color
aren't negatable, but for-i
, we can check for--[no-]ignore-case
.The text was updated successfully, but these errors were encountered: