Re: Gengetopt 2.22 and --show-detailed-help
Lorenzo Bettini <[email protected]> Thu, 13 Mar 2008 08:51:22 +0100
| Newsgroups | gmane.comp.gnu.gengetopt.general |
|---|---|
| Message-ID | <[email protected]> |
Hi there nice to hear from you! I think I've used a standard format for help output (e.g., it can be used by help2man). But I'm not sure about that... any clue anyone? cheers Lorenzo T o n g wrote: > Hi Lorenzo, > > Congratulation on the new Gengetopt v2.22, although the congratulation > comes late :-). It's really a polished release. I like the new features > like -no-help, --no-version, and especially --show-detailed-help. > > I'd like to make a suggestion regarding the format of --show-detailed-help: > > Current practice (from gengetopt --detailed-help) will produce help like > this: > > -s, --str-opt=filename A string option, for a filename > -m, --my-opt=INT Another integer option, this time the description of > the option should be quite long to require > wrapping... possibly more than one wrapping :-) > especially if I > require a line break > -i, --int-opt=INT A int option > -F, --funct-opt A function option > > A function option is basically an option with no argument. It can be > used, e.g., to specify a specific behavior for a program. > > Well, this further explanation is quite useless, but it's only to show an > example of an option with details, which will be printed only when > > --detailed-help is given at the command line. > --flag-opt A flag option (default=off) > --long-opt=LONG A long option > --def-opt=STRING A string option with default (default=`Hello') > --enum-opt=STRING A string option with list of values (possible > values="foo", "bar", "hello", "bye" > default=`hello') > -S, --secret=INT hidden option will not appear in --help > -D, --dependant=INT option that depends on str-opt > > I.e., if the details is used sparely, the extra spaces around the detailed > helps don't coherent with other no-space options. > > However, if we remove the spaces, it will look like this: > > -s, --str-opt=filename A string option, for a filename > -m, --my-opt=INT Another integer option, this time the description of > the option should be quite long to require > wrapping... possibly more than one wrapping :-) > especially if I > require a line break > -i, --int-opt=INT A int option > -F, --funct-opt A function option > A function option is basically an option with no argument. It can be used, > e.g., to specify a specific behavior for a program. > > Well, this further explanation is quite useless, but it's only to show an > example of an option with details, which will be printed only when > --detailed-help is given at the command line. > --flag-opt A flag option (default=off) > --long-opt=LONG A long option > --def-opt=STRING A string option with default (default=`Hello') > --enum-opt=STRING A string option with list of values (possible > values="foo", "bar", "hello", "bye" > default=`hello') > -S, --secret=INT hidden option will not appear in --help > -D, --dependant=INT option that depends on str-opt > > I.e., visually it is not quite obvious that the detailed help goes with > the -F option. > > So, I'm wondering if we could change the format to look like this: > > -s, --str-opt=filename A string option, for a filename > -m, --my-opt=INT Another integer option, this time the description of > the option should be quite long to require > wrapping... possibly more than one wrapping :-) > especially if I > require a line break > -i, --int-opt=INT A int option > -F, --funct-opt A function option > A function option is basically an option with no argument. It can > be used, e.g., to specify a specific behavior for a program. > > Well, this further explanation is quite useless, but it's only to > show an example of an option with details, which will be printed > only when --detailed-help is given at the command line. > --flag-opt A flag option (default=off) > --long-opt=LONG A long option > --def-opt=STRING A string option with default (default=`Hello') > --enum-opt=STRING A string option with list of values (possible > values="foo", "bar", "hello", "bye" > default=`hello') > -S, --secret=INT hidden option will not appear in --help > -D, --dependant=INT option that depends on str-opt > > I.e., make it is a bit obvious visually that the detailed help goes > with the -F option, and it won't hurt if all options detailed help > have extra spaces around them. > > What do you think? > > Thanks > -- Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino ICQ# lbetto, 16080134 (GNU/Linux User # 158233) HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com http://www.myspace.com/supertrouperabba BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com http://www.gnu.org/software/src-highlite http://www.gnu.org/software/gengetopt http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net