freebsd-dev/usr.bin/grep
Craig Leres c4cbf1fbab Fix some regressions with the zgrep(1) wrapper.
- Handle whitespace with long flags that take arguments:

	echo 'foo bar' > test
	zgrep --regexp='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=pattern 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
2020-07-20 23:57:53 +00:00
..
tests bsdgrep(1): add some basic tests for some GNU Extension support 2019-09-03 18:32:29 +00:00
file.c bsdgrep(1): Evict character sequence that moved in 2018-06-08 12:58:55 +00:00
grep.1 Adjust formatting of grep and zgrep manual pages. 2018-08-20 22:23:59 +00:00
grep.c bsdgrep(1): various fixes of empty pattern/exit code/-c behavior 2019-09-25 17:14:43 +00:00
grep.h bsdgrep(1): Slooowly peel away the chunky onion 2018-06-08 01:25:07 +00:00
Makefile Fix bsdgrep manpage clobbering grep(1) with default build options 2019-01-09 02:47:07 +00:00
Makefile.depend Update Makefile.depend files 2019-12-11 17:37:53 +00:00
Makefile.depend.options Add Makefile.depend.options 2019-12-11 17:37:37 +00:00
queue.c various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
util.c bsdgrep(1): various fixes of empty pattern/exit code/-c behavior 2019-09-25 17:14:43 +00:00
zgrep.1 Fix some regressions with the zgrep(1) wrapper. 2020-07-20 23:57:53 +00:00
zgrep.sh Fix some regressions with the zgrep(1) wrapper. 2020-07-20 23:57:53 +00:00