On Thu, 2005-06-16 at 20:12 -0700, Eric Wilhelm wrote:
> # The following was supposedly scribed by
> # Keith Ivey
> # on Thursday 16 June 2005 07:46 pm:
> 
> >> Ok.  Here's one edge-case which probably involves somebody smart
> >> enough to not get stuck in it.  Is this really a good argument for
> >> perplexing the user the other 99% of the time?
> >
> >It seems to me that that situation is far more than 1%, more like 99%,
> >of the times *when both --foo and --no-foo options are specified*.  
> 
> Do you mean to say that 99% of the time (when --foo and --no-foo are 
> both present) that it is because somebody has an alias with a --foo 
> flag written into it?

Yes. I've _never_ used a program where I found myself using both --foo
and --no-foo on the command line unless I was over-riding an alias. A
straw poll of a couple others in the lab indicated that they also have
never had occasion (at least that they recall) to type both --foo and
--no-foo. I also can't think of a single program where that would be
called for in normal use. IMHO if I wrote a program that encouraged that
sort of use, I would assume I had poorly designed it and try to fix that
issue.

And as another point, I doubt the vast majority of people who are using
command line interfaces to complex programs are _average_ users. If I
have a complex program that users who are not experienced or comfortable
with complex sets of command line options need to use, I either create a
GUI interface of some kind, or set aup a couple system aliases with the
most common options specified.

> >Second, what sort of user  is going to be typing "--foo --no-foo" 
> >(or "--no-foo --foo")?  If I  did run into that sort of user I'd be
> >mystified as to what they intended
> 
> If it's not clear what '--no-foo --foo' means then it wouldn't impact 
> you either way I write it?
> 
> The purpose of a negated option is (in all of the usages that I have 
> seen) to reset any hard-coded or config-file variable.

And is why, if I want a user to set a value, I use 'foo=i' or 'foo=s' or
such. That seems far more natural to me, and has worked quite well in my
experience. What user, who might be confused by --foo --no-foo handling,
is going to even _know_ that --no-foo is an option?!?

-- 
Sean Quinlan <[EMAIL PROTECTED]>
Massachusetts General Hospital

Reply via email to