The branch main has been updated by kevans:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=4c14980baab5aa678fa8a1ca046892cf30e92d71

commit 4c14980baab5aa678fa8a1ca046892cf30e92d71
Author:     Kyle Evans <[email protected]>
AuthorDate: 2021-11-10 06:42:42 +0000
Commit:     Kyle Evans <[email protected]>
CommitDate: 2021-11-10 06:42:42 +0000

    grep: fix/remove references to -P
    
    -P in gnugrepland means PCRE, which we do not support.  We may eventually
    support it if onigmo ends up getting imported as a more performant regex
    implementation, and we can re-add it properly in these places (and more)
    when that time comes.
    
    The optstr change is a functional nop; the case was not explicitly handled,
    thus ending in usage() anyways.
    
    Reported by:    Vladimir Misev (via twitter)
---
 usr.bin/grep/grep.1 | 4 ++--
 usr.bin/grep/grep.c | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/usr.bin/grep/grep.1 b/usr.bin/grep/grep.1
index 5f314d0dff7c..3312f2510d30 100644
--- a/usr.bin/grep/grep.1
+++ b/usr.bin/grep/grep.1
@@ -30,7 +30,7 @@
 .\"
 .\"    @(#)grep.1      8.3 (Berkeley) 4/18/94
 .\"
-.Dd April 17, 2021
+.Dd November 10, 2021
 .Dt GREP 1
 .Os
 .Sh NAME
@@ -558,7 +558,7 @@ utility is compliant with the
 specification.
 .Pp
 The flags
-.Op Fl AaBbCDdGHhILmoPRSUVw
+.Op Fl AaBbCDdGHhILmopRSUVw
 are extensions to that specification, and the behaviour of the
 .Fl f
 flag when used with an empty pattern file is left undefined.
diff --git a/usr.bin/grep/grep.c b/usr.bin/grep/grep.c
index 6fbd6bee8ace..6306cbff5932 100644
--- a/usr.bin/grep/grep.c
+++ b/usr.bin/grep/grep.c
@@ -57,7 +57,7 @@ const char    *errstr[] = {
        "",
 /* 1*/ "(standard input)",
 /* 2*/ "unknown %s option",
-/* 3*/ "usage: %s [-abcDEFGHhIiLlmnOoPqRSsUVvwxz] [-A num] [-B num] [-C 
num]\n",
+/* 3*/ "usage: %s [-abcDEFGHhIiLlmnOopqRSsUVvwxz] [-A num] [-B num] [-C 
num]\n",
 /* 4*/ "\t[-e pattern] [-f file] [--binary-files=value] [--color=when]\n",
 /* 5*/ "\t[--context=num] [--directories=action] [--label] 
[--line-buffered]\n",
 /* 6*/ "\t[--null] [pattern] [file ...]\n",
@@ -110,7 +110,7 @@ bool         lbflag;        /* --line-buffered */
 bool    nullflag;      /* --null */
 char   *label;         /* --label */
 const char *color;     /* --color */
-int     grepbehave = GREP_BASIC;       /* -EFGP: type of the regex */
+int     grepbehave = GREP_BASIC;       /* -EFG: type of the regex */
 int     binbehave = BINFILE_BIN;       /* -aIU: handling of binary files */
 int     filebehave = FILE_STDIO;
 int     devbehave = DEV_READ;          /* -D: handling of devices */
@@ -152,7 +152,7 @@ usage(void)
        exit(2);
 }
 
-static const char      *optstr = 
"0123456789A:B:C:D:EFGHILOPSRUVabcd:e:f:hilm:nopqrsuvwxyz";
+static const char      *optstr = 
"0123456789A:B:C:D:EFGHILOSRUVabcd:e:f:hilm:nopqrsuvwxyz";
 
 static const struct option long_options[] =
 {

Reply via email to