Package: grep;
Reported by: "Garreau,円 Alexandre" <galex-713 <at> galex-713.eu>
Date: 2018年5月20日 01:58:02 UTC
Severity: wishlist
Tags: notabug
Message #8 received at 31537 <at> debbugs.gnu.org (full text, mbox):
From: Paul Eggert <eggert <at> cs.ucla.edu> To: "Garreau, Alexandre" <galex-713 <at> galex-713.eu>, 31537 <at> debbugs.gnu.org Subject: Re: bug#31537: Combining -v and -A/-B/-C options Date: 2018年5月20日 18:03:04 -0700
Garreau, Alexandre wrote: > I believe context options used in conjonction with invert-match option > should specify which lines*not to show* along with matched then not > shown lines. I can see it the other way. For example, "show all lines that lack signed integers, plus their context" can be done via a command like "grep -C1 -v -E '[-+][0-9]+([^.e]|$)'", and I don't see any easy way to do the same search under the changes you're proposing. In essence you're proposing a new feature that I'd call "negative context"; i.e., if a line is not selected, then suppress the output of nearby lines that are selected. grep already has a lot of features and it's not clear this one is important enough to add. > maybe this behavior could be triggered only > if the context option were specified *after* the invert-match one I'd prefer option order to not matter, at least when options do not simply override each other (as is the case here).
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.