diff options
author | imp <imp@FreeBSD.org> | 2010-03-31 17:40:13 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2010-03-31 17:40:13 +0000 |
commit | fd75fb84178fb083ef0af86f7775323b449b636b (patch) | |
tree | cf8a3ddeb69a95b77cdcbfa76a721e9cb9cf5d82 /usr.bin | |
parent | 3bd875003c9cfb8544833da3029fc72d93c416b5 (diff) | |
download | FreeBSD-src-fd75fb84178fb083ef0af86f7775323b449b636b.zip FreeBSD-src-fd75fb84178fb083ef0af86f7775323b449b636b.tar.gz |
Make -r mean exactly the same thing as -E for increased compatibility
with GNU sed.
MFC after: 7 days
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/sed/main.c | 3 | ||||
-rw-r--r-- | usr.bin/sed/sed.1 | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/usr.bin/sed/main.c b/usr.bin/sed/main.c index 1a140b1..8d4fe95 100644 --- a/usr.bin/sed/main.c +++ b/usr.bin/sed/main.c @@ -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; diff --git a/usr.bin/sed/sed.1 b/usr.bin/sed/sed.1 index d5858ff..0744630 100644 --- a/usr.bin/sed/sed.1 +++ b/usr.bin/sed/sed.1 @@ -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 |