bug-grep
[Top][All Lists]
Advanced

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

Re: Patch: non-empty matches following empty ones


From: Julian Foad
Subject: Re: Patch: non-empty matches following empty ones
Date: Fri, 26 Aug 2005 11:33:34 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511

Charles Levert wrote:
--- grep/ChangeLog      27 Jul 2005 02:44:53 -0000      1.270
+++ grep/ChangeLog      23 Aug 2005 15:40:20 -0000
@@ -1,3 +1,15 @@
+2005-08-23  Charles Levert  <address@hidden>
+
+       * src/grep.c (print_line_middle): In case of an empty match,
+         make minimal progress and continue instead of aborting process
+         of the remainder of the line, in case there's still an upcoming
+         non-empty match.
+       * tests/foad1.sh: Add two tests for this.
+       * doc/grep.texi, doc/grep.1: Document this behavior, since
+         --only-matching and --color are GNU extensions which are
+         otherwise unspecified by POSIX or other standards.  Warn users
+         against using patterns that produce zero-length matches.

Please would you start your ChangeLog entry with a sentence or two saying what the change is. In this case, I'm not completely clear but I think the change does two things which you could describe like this:

1. With "--only-matching" or "--color", ensure non-empty matches are
   displayed or colored even after an empty match.  (Bug fix.)

2. With "--only-matching" or "--color", don't display or color empty
   matches.  (Behaviour change.)

Is that right?

- Julian




reply via email to

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