Kyle Evans f823c6dc73 grep: fix null pattern and empty pattern file behavior
The null pattern semantics were terrible because I tried to match gnugrep,
but I got it wrong.  Let's unwind that:

- The null pattern should match every line if neither -w nor -x.
- The null pattern should match empty lines if -x.
- The null pattern should not match any lines if -w.

The first two will stop processing (shortcut) even if additional patterns
are specified. In any other case, we will continue processing other
patterns.  If no other patterns are specified beside a null pattern, then
we match if neither -w nor -x or set and do not match if either of those
are specified.

The justification for -w is that it should match on a whole word, but the
null pattern deos not have a whole word to match on.

Empty pattern files should never match anything, and more importantly, -v
should cause everything to be written.

PR:		253209
MFC-after:	4 days
2021-02-04 20:59:42 -06:00
..
2021-01-13 22:21:37 -08:00
2020-12-10 10:58:30 +00:00
2020-03-29 02:40:03 +00:00
2020-10-24 15:58:42 +00:00
2019-12-21 21:05:53 +00:00
2020-01-25 21:16:45 +00:00
2021-01-13 23:56:18 -06:00
2020-10-24 17:08:59 +00:00
2020-02-19 17:09:08 +00:00
2020-07-10 19:58:07 +00:00
2020-06-24 01:51:05 +00:00
2020-06-17 10:42:20 +00:00
2019-11-20 23:56:20 +00:00
2021-01-12 00:56:35 +02:00
2021-01-25 20:24:44 -08:00
2020-06-22 07:46:24 +00:00
2021-01-02 21:03:28 +02:00
2020-06-17 11:57:48 +00:00
2020-12-18 04:23:20 +00:00