Re: mutually exclusive group of options

"Papp Gyozo (VBuster)" <[email protected]>
Newsgroups gmane.comp.gnu.gengetopt.general
Message-ID <[email protected]>
> 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.
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.