Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Jul 2020 23:58:08 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 247126] zgrep(1) does not handle -f FILE correctly
Message-ID:  <bug-247126-227-mKYE6UUJ2w@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-247126-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-247126-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D247126

--- Comment #11 from commit-hook@FreeBSD.org ---
A commit references this bug:

Author: leres
Date: Mon Jul 20 23:57:54 UTC 2020
New revision: 363381
URL: https://svnweb.freebsd.org/changeset/base/363381

Log:
  Fix some regressions with the zgrep(1) wrapper.

   - Handle whitespace with long flags that take arguments:

        echo 'foo bar' > test
        zgrep --regexp=3D'foo bar' test

   - Do not hang reading from stdin with patterns in a file:

        echo foobar > test
        echo foo > pattern
        zgrep -f pattern test
        zgrep --file=3Dpattern test

   - Handle any flags after -e:

        echo foobar > test
        zgrep -e foo --ignore-case < test

  These two are still outstanding problems:

   - Does not handle flags that take an argument if there is no
     whitespace:

        zgrep -enfs /etc/rpc

   - When more than one -e pattern used matching should occur for all
     patterns (similar to multiple patterns supplied with -f file).
     Instead only the last pattern is used for matching:

        zgrep -e rex -e nfs /etc/rpc

     (This problem is masked in the unpatched version by the "any
     flags after -e" problem.)

  Add tests for the above problems.

  Update the mange and add references to gzip(1) and zstd(1) and also
  document the remaining known problems.

  PR:           247126
  Approved by:  markj
  MFC after:    2 weeks
  Differential Revision:        https://reviews.freebsd.org/D25613

Changes:
  head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh
  head/usr.bin/grep/zgrep.1
  head/usr.bin/grep/zgrep.sh

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-247126-227-mKYE6UUJ2w>