Skip to content

Commit

Permalink
sed: accept s///i as a synonym for s///I ("ignore case")
Browse files Browse the repository at this point in the history
Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
  • Loading branch information
david-a-wheeler authored and Denys Vlasenko committed Dec 18, 2013
1 parent e9355c4 commit 80a068d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion editors/sed.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
* s/match/replace/ #gIpw
* s/match/replace/ #giIpw
* || | |||
* mandatory optional
*/
Expand Down Expand Up @@ -429,6 +429,7 @@ static int parse_subst_cmd(sed_cmd_t *sed_cmd, const char *substr)
break;
}
/* Ignore case (gnu exension) */
case 'i':
case 'I':
cflags |= REG_ICASE;
break;
Expand Down

0 comments on commit 80a068d

Please sign in to comment.