bug-grep
[Top][All Lists]
Advanced

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

Re: when options conflict


From: Benno Schulenberg
Subject: Re: when options conflict
Date: Mon, 14 Nov 2005 22:59:46 +0100
User-agent: KMail/1.8.3

Charles Levert wrote:
> * On Monday 2005-11-14 at 00:50:25 +0100, Benno Schulenberg wrote:
> > Charles Levert wrote:
> > >             If an option that
> > >             has option-arguments is repeated,
> > >             the option and option-argument
> > >             combinations should be interpreted
> > >             in the order specified on the
> > >             command line.
> >
> > if max() was used here, then the order wouldn't matter.
>
> But this wouldn't contradict "in the order
> specified on the command line" either, if we
> explain the max() thing.

In my opinion it does, because for max() order doesn't matter at 
all, so why does POSIX mention "in the order specified"?

Indeed, diff uses max().  Hrrm.  For grep it would be nicer to have 
a single mechanism: if similar or equivalent options are repeated, 
then the last one counts.  This mechanism is needed for the -d and 
-r options.  It would make things easier to comprehend if this same 
mechanism was used for all repeated options.

> > but GNU diff
> > simply aborts: "diff: conflicting output style options".
>
> Mine doesn't.  [...]
>
> For GNU diff, -C and -U do conflict.  Are you
> sure you don't have a -u on that command line
> somewhere and expect -C to be usable with it?

Gah.  Yes, there was a -u too.  Sorry.

Benno




reply via email to

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