[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: when options conflict
From: |
Paul Eggert |
Subject: |
Re: when options conflict |
Date: |
Fri, 19 May 2006 12:37:46 -0700 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) |
Benno Schulenberg <address@hidden> writes:
> Yes, but it would be simpler to also make it a silent override.
> Having several different mechanisms makes the baviour of grep's
> command line less transparent to the user.
I disagree. The general rule for POSIX and GNU utilities is that the
order of options should not matter.
Ideally options are independent of each other, and users can specify
them in any order with no confusion.
Sometimes one option implies another. In that case, order should not
matter either. For example, if -x implies -w, then it shouldn't
matter which order the user specifies: once the user specifies -x,
then whether -w is also specified is logically irrelevant.
Sometimes two options are incompatible. In these cases, it is
sometimes useful to have otherwise-incompatible options override each
other. But this should be limited. It's normally better to report an
error to a user who specifies incompatible options, as such a user is
requesting impossible behavior.
Grep has many options, and we should be wary about documenting or
supporting complicated interactions among them. Complexity like that
generally causes more problems than it cures.
- Re: when options conflict, Benno Schulenberg, 2006/05/19
- Re: when options conflict,
Paul Eggert <=
- Re: when options conflict, Tony Abou-Assaleh, 2006/05/20
- Re: when options conflict, Benno Schulenberg, 2006/05/20
- Re: when options conflict, Paul Eggert, 2006/05/20
- Re: when options conflict, Benno Schulenberg, 2006/05/21
- Re: when options conflict, Paul Eggert, 2006/05/22
- Re: when options conflict, Benno Schulenberg, 2006/05/22
- Re: when options conflict, Paul Eggert, 2006/05/22
- Re: when options conflict, Benno Schulenberg, 2006/05/22
- Re: when options conflict, Paul Eggert, 2006/05/23
- Re: when options conflict, Benno Schulenberg, 2006/05/23