On Sat, 30 Sep 2006 10:38:06 +0200, Lorenzo Bettini wrote:
> T wrote:
>> Hi
>>
>> I found that gengetopt is very useful. However, I wish it can
>> handle (at least document) mandatory parameters as well.
>>
>> By "mandatory parameter" I don't mean setting the required field as
>> required for "option", but real parameters. like for command cp:
>>
>> cp [options] <source> <dest>
>>
>> the "source" & "dest".
>
> you mean have some "unnamed options" as required?
I don't know what your "unnamed options" means exactly. I search for the
keyword "unnamed" in the manual but didn't find anything. Anyway, I meant:
Currently, gengetopt only handle switches. The usage message is:
Usage: sample1 [OPTIONS]...
-h, --help Print help and exit
--full-help Print help, including hidden options, and exit
I want, with the help of "mandatory parameter", it can be:
Usage: sample1 [OPTIONS]... SOURCE DEST
SOURCE mandatory parameter to ...
DEST ... copy SOURCE to DEST
-h, --help Print help and exit
--full-help Print help, including hidden options, and exit
or something like that.
Hope I've made it clearer this time.
thanks
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.