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

Lorenzo Bettini <[email protected]>
Newsgroups gmane.comp.gnu.gengetopt.general
Message-ID <[email protected]>
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     |
+-----------------------------------------------------+
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.