sed: Perform case insensitive substitutions with "/i"
This commit is contained in:
parent
0dc65cd835
commit
96d3d3b0fe
Notes:
sideshowbarker
2024-07-17 02:02:47 +09:00
Author: https://github.com/water-ghosts Commit: https://github.com/SerenityOS/serenity/commit/96d3d3b0fe Pull-request: https://github.com/SerenityOS/serenity/pull/16584 Reviewed-by: https://github.com/ADKaster ✅ Reviewed-by: https://github.com/gmta Reviewed-by: https://github.com/kleinesfilmroellchen Reviewed-by: https://github.com/rtobar
1 changed files with 2 additions and 0 deletions
|
@ -90,6 +90,8 @@ static ErrorOr<SubstitutionCommand> parse_command(StringView command)
|
|||
} else if (flag == "g"sv) {
|
||||
// Allow multiple matches per line by un-setting the SingleMatch flag
|
||||
options &= ~PosixFlags::SingleMatch;
|
||||
} else if (flag == "i"sv || flag == "I"sv) {
|
||||
options |= PosixFlags::Insensitive;
|
||||
} else {
|
||||
warnln("sed: Unsupported flag: {}", flag);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue