Closed bardes closed 5 years ago
I like the idea of having vertically aligned argument lists when displaying multiple aliases for an option. Probably not for simple flags though:
-h,
--help
Show this help message and exit.
wastes too much space IMO.
Also, it makes sense to start outputting the description from the very first line if it fits after the option name and arguments. So, instead of
--output <output>,
-o <output>
Output file.
Some more words.
And more descriptions.
show this:
--output <output>, Output file.
-o <output> Some more words.
And more descriptions.
Implemented on master branch.
I'll also add a way to space out help messages for different options with a parser property.
Added parser properties on master branch:
help_vertical_space
: adds a number of extra new lines between blocks for different options or arguments in the help message, e.g. parser:help_vertical_space(1)
for one empty line.help_usage_margin
: sets number of spaces to put before usage string inside help message (3 by default).help_description_margin
: sets margin for option and argument descriptions (25 by default).Plus also usage_margin
and usage_max_witdh
for configuring generation of the usage string at the top of help.
@bardes I think the issue is fixed? could you close it?
I know this is a bit on the opinion side but it would be nice to have linebreaks between the options for easier readability. I'd also change the way long options are listed from:
to:
That is: stack multiple long options above each other, left pad them, and reduce the margin to allow for longer and more readable descriptions.