help-gengetopt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[help-gengetopt] Gengetopt 2.22 and --show-detailed-help


From: T o n g
Subject: [help-gengetopt] Gengetopt 2.22 and --show-detailed-help
Date: Sat, 8 Mar 2008 16:44:55 +0000 (UTC)
User-agent: pan 0.119 (Karma Hunters)

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

-- 
Tong (remove underscore(s) to reply)
  http://xpt.sourceforge.net/techdocs/
  http://xpt.sourceforge.net/tools/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]