help-gengetopt
[Top][All Lists]
Advanced

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

Re: [help-gengetopt] Re: [feature-request]: Indicate mandatory options


From: Lorenzo Bettini
Subject: Re: [help-gengetopt] Re: [feature-request]: Indicate mandatory options
Date: Sun, 01 Oct 2006 21:08:44 +0200
User-agent: Thunderbird 1.5.0.7 (X11/20060915)

T wrote:
1st of all, thanks for all your replies Lorenzo. It really gives a warm
feeling to a newcomer like me.

you are very welcome! :-)

if you could provide me with your name and surname (you can email me privately) I can update the THANKS file with your name.


On Sat, 30 Sep 2006 10:32:44 +0200, Lorenzo Bettini wrote:

I noticed that the mandatory options ("required") are not indicated on the
usage help message.
you mean in the usage line?

they are shown, provided you run gengetopt with the option --long-help, e.g., the sample1:

Usage: sample1 -iINT|--int-opt=INT [-h|--help] [--full-help] [-V|--version] -sfilename|--str-opt=filename -mINT|--my-opt=INT [--flag-opt] [-F|--funct-opt] --long-opt=LONG --def-opt=STRING --enum-opt=STRING -DINT|--dependant=INT [FILES]...

Oh, I didn't know that.

as you read in my previous post (with the url link), now this usage string highlights the optional options (by using [] which for the moment were handled in a wrong way, so thank you again for your email :-)


is that what you meant?

I meant the usage help message:

$ grep required sample0.ggo
option  "str-opt"         s "A string option, for a filename"      string 
typestr="filename"     required
option  "long-opt"        - "A long option"        long       required

$ gengetopt --show-help -i sample0.ggo | grep -- '[rg]-opt'
  -s, --str-opt=filename  A string option, for a filename
      --flag-opt          A flag option  (default=off)
      --long-opt=LONG     A long option
  -D, --dependant=INT     option that depends on str-opt

I think it is a good idea to indicate which options are required here also. E.g.,

      --long-opt=LONG     A long option (mandatory)

or something like that.

I added the --show-required gengetopt's option (see my other post)

hope to hear from you soon

cheers
        Lorenzo

--
+-----------------------------------------------------+
| Lorenzo Bettini          ICQ# lbetto, 16080134      |
| PhD in Computer Science, DSI, Univ. di Firenze      |
| Florence - Italy        (GNU/Linux User # 158233)   |
| http://www.lorenzobettini.it                        |
| http://tronprog.blogspot.com  BLOG                  |
| http://www.purplesucker.com Deep Purple Cover Band  |
| http://www.gnu.org/software/src-highlite            |
| http://www.gnu.org/software/gengetopt               |
| http://www.lorenzobettini.it/software/gengen        |
| http://www.lorenzobettini.it/software/doublecpp     |
+-----------------------------------------------------+




reply via email to

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