mirror of
https://github.com/watchexec/watchexec.git
synced 2024-09-29 14:41:35 +02:00
Add more aliases for matcher
This commit is contained in:
parent
5ebceddc3e
commit
ba9d9939d9
@ -24,22 +24,24 @@ impl FromStr for Filter {
|
|||||||
tag_no_case("path"),
|
tag_no_case("path"),
|
||||||
tag_no_case("type"),
|
tag_no_case("type"),
|
||||||
tag_no_case("kind"),
|
tag_no_case("kind"),
|
||||||
|
tag_no_case("fek"),
|
||||||
tag_no_case("source"),
|
tag_no_case("source"),
|
||||||
tag_no_case("src"),
|
tag_no_case("src"),
|
||||||
tag_no_case("process"),
|
tag_no_case("process"),
|
||||||
|
tag_no_case("pid"),
|
||||||
tag_no_case("signal"),
|
tag_no_case("signal"),
|
||||||
|
tag_no_case("complete"),
|
||||||
tag_no_case("exit"),
|
tag_no_case("exit"),
|
||||||
)),
|
)),
|
||||||
|m: &str| match m.to_ascii_lowercase().as_str() {
|
|m: &str| match m.to_ascii_lowercase().as_str() {
|
||||||
"tag" => Ok(Matcher::Tag),
|
"tag" => Ok(Matcher::Tag),
|
||||||
"path" => Ok(Matcher::Path),
|
"path" => Ok(Matcher::Path),
|
||||||
"type" => Ok(Matcher::FileType),
|
"type" => Ok(Matcher::FileType),
|
||||||
"kind" => Ok(Matcher::FileEventKind),
|
"kind" | "fek" => Ok(Matcher::FileEventKind),
|
||||||
"source" => Ok(Matcher::Source),
|
"source" | "src" => Ok(Matcher::Source),
|
||||||
"src" => Ok(Matcher::Source),
|
"process" | "pid" => Ok(Matcher::Process),
|
||||||
"process" => Ok(Matcher::Process),
|
|
||||||
"signal" => Ok(Matcher::Signal),
|
"signal" => Ok(Matcher::Signal),
|
||||||
"exit" => Ok(Matcher::ProcessCompletion),
|
"complete" | "exit" => Ok(Matcher::ProcessCompletion),
|
||||||
m => Err(format!("unknown matcher: {}", m)),
|
m => Err(format!("unknown matcher: {}", m)),
|
||||||
},
|
},
|
||||||
)(i)
|
)(i)
|
||||||
|
Loading…
Reference in New Issue
Block a user