|
From: | Lorenzo Bettini |
Subject: | Re: [help-gengetopt] mutually exclusive group of options |
Date: | Thu, 14 Jun 2007 11:51:51 +0200 |
User-agent: | Thunderbird 1.5.0.12 (Windows/20070509) |
Gyozo Papp wrote:
> scan --dir2 ... > scan --dir1 -dir2 ... > > The common in both examples is that --init is omitted. and again, putting --dir1 and --dir2 in the same group of init should be enough, shouldn't it? This way, if you provide --dir1, --dir2 or even --init, you cannot provide any --attach's group options...IN this --dir1 and --dir2 will be mutually exclusive along with --init and --attach, won't be? This is not exactly what I want.did I get the point?Maybe but I'm afraid I'm getting lost. ;)
Actually, I'm the one that got lost, sorry :-)I thought that groups options were not mutually exclusive among them (I didn't implement that feature personally in first place, and actually never used that, so I never remember correctly how they work :-) I actually remembered that if you specified an option of a group you couldn't specify an option of another group, but that's not right. Instead, if you specify an option of one group and another option of another group is allowed.
So the only solution is to make --init and --attach belong to the same group (so that they're exclusive with each other), and then use dependon for all the other options.
Unfortunately, this requires --init to be specified explicitly (which is not what you want...).
Do you have any proposals of a new mechanism to solve this?Of course, one could perform checks manually, but one would want most of the checks to be performed automatically, right? :-)
hope to hear from you soon cheers Lorenzo -- Lorenzo Bettini, PhD in Computer Science, DSI, Univ. di Firenze ICQ# lbetto, 16080134 (GNU/Linux User # 158233) HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com http://www.gnu.org/software/src-highlite http://www.gnu.org/software/gengetopt http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
[Prev in Thread] | Current Thread | [Next in Thread] |