Subject: Re: bug#26254: grep's -m breaks -A

From: Jim Meyering <[email-masked]>
Date: Thu, 15 Jun 2017 21:58:05 -0700

On Thu, Jun 15, 2017 at 7:09 AM, Nicholas Sushkin
<[email-masked]> wrote:
> I agree with Stu,
>
> I wanted to see the first match of an Error in its context, so I used grep
> -E Error -m 1 -C 10.
> Grep didn't show the context after the match because there was another
> match for Error right after the first.
> I'd like to have an option to see the full context whether it has matches
> or not.
>
> ps. This is actually bug #28588 http://savannah.gnu.org/bugs/?28588

I am coming around... I think we may have been too hasty in making
this behavior the default. While I see how the current default can be
useful, that usage feels like it would be far less common than the
usage/expectation that provokes surprising (and likely to provoke
malfunction) behavior.

What do you think, Paul? Switch the default and add an option for the
current-default `--max-count=N`-trumps-`--context=N` behavior?