From 96d3d3b0fe9b2d76cfc16f09ae28ef7a29247707 Mon Sep 17 00:00:00 2001 From: Eli Youngs Date: Sun, 18 Dec 2022 22:55:49 -0800 Subject: [PATCH] sed: Perform case insensitive substitutions with "/i" --- Userland/Utilities/sed.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Userland/Utilities/sed.cpp b/Userland/Utilities/sed.cpp index c481139161..d25dd969a7 100644 --- a/Userland/Utilities/sed.cpp +++ b/Userland/Utilities/sed.cpp @@ -90,6 +90,8 @@ static ErrorOr 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); }