On Sun, 01 Oct 2006 13:55:07 +0200, Papp Gyozo (VBuster) wrote: >> 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
I search for the keyword "unnamed" in the manual but didn't find anything. > hint: gengetopt --help | grep -i unname returns nothing. > 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? Yes. But I guess it is hard to implement naming those unnamed options, and I think it is better to let the main program handle the stored parameters in the array 'inputs' of the args_info structure, not gengetopt. What gengetopt can do, however, is to document those mandatory parameters. After all that's the on-line help that users see. If they are not documented in the on-line help, for the 99% of people who don't read man pages, they have to try-and-error to know what parameters are mandatory. _______________________________________________ Help-gengetopt mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gengetopt
