#18 Add support for verbose option descriptions.

open
Greg Ward
5
2005-08-30
2005-08-29
Micah Elliott
No

Usually users want exactly what is printed by the
--help option.

$ foo --help
...
--xxx do xxx
...

But sometimes it is nice to have a few more details
about each option.
Eg, compare the "OPTIONS" section of the "make(1)"
manpage with "make
--help" output.

$ foo --help-long-option-descriptions # or maybe
--HELP
...
--xxx do xxx. This has the side-effect of
turning on yyy. You
may want to use this when ...
...

An option like "--help-long-option-descriptions" would
provide a means
to see long descriptions for each option when desired.
This does not
even need to be a user-visible option (SUPPRESS_HELP),
but is
desirable for a tool such as help2man that could take
advantage of it
by using this verbose output for use in the generated
makefile.
help2man already has support for such an option:

$ help2man
--help-option="--help-long-option-descriptions" ./foo.py

Then OptionParser.add_option could have an additional
arg like
"help_extended" that contains the additional option info.

parser.add_option('--xxx',
help='do xxx',
help_extended='This has the
side-effect of turning...',
)

Discussion

  • Micah Elliott
    Micah Elliott
    2005-08-29

    • labels: --> misc features
    • milestone: --> Next_Release_(example)
     
  • Micah Elliott
    Micah Elliott
    2005-08-30

    • assigned_to: nobody --> gward