Make -r mean exactly the same thing as -E for increased compatibility

with GNU sed.

MFC after:	7 days
This commit is contained in:
Warner Losh 2010-03-31 17:40:13 +00:00
parent c58c7416c7
commit 701d73b65c
2 changed files with 8 additions and 3 deletions

View File

@ -130,8 +130,9 @@ main(int argc, char *argv[])
fflag = 0;
inplace = NULL;
while ((c = getopt(argc, argv, "EI:ae:f:i:ln")) != -1)
while ((c = getopt(argc, argv, "EI:ae:f:i:lnr")) != -1)
switch (c) {
case 'r': /* Gnu sed compat */
case 'E':
rflags = REG_EXTENDED;
break;

View File

@ -39,11 +39,11 @@
.Nd stream editor
.Sh SYNOPSIS
.Nm
.Op Fl Ealn
.Op Fl Ealnr
.Ar command
.Op Ar
.Nm
.Op Fl Ealn
.Op Fl Ealnr
.Op Fl e Ar command
.Op Fl f Ar command_file
.Op Fl I Ar extension
@ -144,6 +144,10 @@ all of the commands have been applied to it.
The
.Fl n
option suppresses this behavior.
.It Fl r
Same as
.Fl E
for compatibility with GNU sed.
.El
.Pp
The form of a