From 9e99aad01b30e0a429fe2a714c6bddf1b33b5d78 Mon Sep 17 00:00:00 2001 From: Fuad Ismail Date: Thu, 12 Dec 2024 13:17:57 +0700 Subject: [PATCH] dmesg: support single quoted argument for since/until options. --- src/uu/dmesg/src/dmesg.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/uu/dmesg/src/dmesg.rs b/src/uu/dmesg/src/dmesg.rs index 2ad6427..8f53085 100644 --- a/src/uu/dmesg/src/dmesg.rs +++ b/src/uu/dmesg/src/dmesg.rs @@ -493,7 +493,9 @@ impl TryFrom for Facility { } fn remove_enclosing_quotes(value: &str) -> &str { - if value.starts_with('"') && value.ends_with('"') { + if (value.starts_with('"') || value.starts_with('\'')) + && (value.ends_with('"') || value.ends_with('\'')) + { &value[1..value.len() - 1] } else { value