From ba9d9939d94b16e351dae139f4a684af42880424 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Saparelli?= Date: Sat, 18 Dec 2021 12:44:18 +1300 Subject: [PATCH] Add more aliases for matcher --- lib/src/filter/tagged/parse.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/src/filter/tagged/parse.rs b/lib/src/filter/tagged/parse.rs index 0c76f964..c0c5b45d 100644 --- a/lib/src/filter/tagged/parse.rs +++ b/lib/src/filter/tagged/parse.rs @@ -24,22 +24,24 @@ impl FromStr for Filter { tag_no_case("path"), tag_no_case("type"), tag_no_case("kind"), + tag_no_case("fek"), tag_no_case("source"), tag_no_case("src"), tag_no_case("process"), + tag_no_case("pid"), tag_no_case("signal"), + tag_no_case("complete"), tag_no_case("exit"), )), |m: &str| match m.to_ascii_lowercase().as_str() { "tag" => Ok(Matcher::Tag), "path" => Ok(Matcher::Path), "type" => Ok(Matcher::FileType), - "kind" => Ok(Matcher::FileEventKind), - "source" => Ok(Matcher::Source), - "src" => Ok(Matcher::Source), - "process" => Ok(Matcher::Process), + "kind" | "fek" => Ok(Matcher::FileEventKind), + "source" | "src" => Ok(Matcher::Source), + "process" | "pid" => Ok(Matcher::Process), "signal" => Ok(Matcher::Signal), - "exit" => Ok(Matcher::ProcessCompletion), + "complete" | "exit" => Ok(Matcher::ProcessCompletion), m => Err(format!("unknown matcher: {}", m)), }, )(i)