[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [help-gengetopt] Re: wishlist: mandatory parameters
From: |
Papp Gyozo (VBuster) |
Subject: |
Re: [help-gengetopt] Re: wishlist: mandatory parameters |
Date: |
Sun, 01 Oct 2006 13:55:07 +0200 |
> 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
Actually SOURCE and DEST is called unnamed options in gengetopt because as you
figured out earlier it deals with options: ie. commandline arguments starting
with one or two dashes. All above this (the rest) are assembled and stored into
the array 'inputs' of the args_info structure, and are refered to unnamed
options.
I think what you really want is to be able to name some of the unnamed options
(SOURCE & DEST) and to use those as a normal mandatory parameters. If those are
missing prgram exits with failure. Am I right?
hint: gengetopt --help | grep -i unname
- Re: [help-gengetopt] Re: wishlist: mandatory parameters,
Papp Gyozo (VBuster) <=