help-gengetopt
[Top][All Lists]
Advanced

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

Re: [help-gengetopt] mutually exclusive group of options


From: Papp Gyozo (VBuster)
Subject: Re: [help-gengetopt] mutually exclusive group of options
Date: Wed, 13 Jun 2007 11:46:59 +0200

> option  "dependant"         D
>    "option that depends on str-opt" int optional dependon="str-opt"
> 
> does this solve your problem?

More or less. I actually idealize the situation to strip down my problem:

> > scan --init   --dir1=... --dir2=...
> > scan --attach --address=...

The first usage is default (used much more than the second one), moreover the 
distinctive option (ie. --init) is not required even more a hidden option 
actually *without* default values. So in most cases the user doesn't specify 
the "main" option either because he has not to do so or because he simply are 
not aware of it.  Thus in my understanding if --init is not present, error will 
be generated each time if a dependant option is given.

    scan --init=/path/to/lib/to/load.so --dir1=... --dir2=... ; no error

    scan --dir1=... --dir2=... ; error because no --init is given

Unfortunately this latter one is the most common use-case with this 
application. :-(
I'm thinking about what default value I can define for --init to be compatible 
with previous versions.




reply via email to

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