Change auto op for FEKs to glob
@@ -93,16 +93,15 @@ impl FromStr for Filter {
on: m,
op: match o {
Op::Auto => match m {
- Matcher::Path => Op::Glob,
+ Matcher::Path | Matcher::FileEventKind => Op::Glob,
_ => Op::InSet,
},
o => o,
},
pat: match (o, m) {
// TODO: carry regex/glob errors through
- (Op::Auto | Op::Glob, Matcher::Path) | (Op::Glob | Op::NotGlob, _) => {
- Pattern::Glob(p.to_string())
- }
+ (Op::Auto, Matcher::Path | Matcher::FileEventKind)
+ | (Op::Glob | Op::NotGlob, _) => Pattern::Glob(p.to_string()),
(Op::Auto | Op::InSet | Op::NotInSet, _) => {
Pattern::Set(p.split(',').map(|s| s.trim().to_string()).collect())
}
