sed: accept s///i as a synonym for s///I ("ignore case")

Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
David A. Wheeler 2013-12-05 20:42:17 -05:00 committed by Denys Vlasenko
parent e9355c4326
commit 80a068d741

View File

@ -381,7 +381,7 @@ static int parse_subst_cmd(sed_cmd_t *sed_cmd, const char *substr)
/* /*
* A substitution command should look something like this: * A substitution command should look something like this:
* s/match/replace/ #gIpw * s/match/replace/ #giIpw
* || | ||| * || | |||
* mandatory optional * mandatory optional
*/ */
@ -429,6 +429,7 @@ static int parse_subst_cmd(sed_cmd_t *sed_cmd, const char *substr)
break; break;
} }
/* Ignore case (gnu exension) */ /* Ignore case (gnu exension) */
case 'i':
case 'I': case 'I':
cflags |= REG_ICASE; cflags |= REG_ICASE;
break; break;