Parent
Epic #426, Plan: .local/plan/m26.1-output-filtering-improvements.md
Priority: P0 (blocks Phase 1)
Problem
Current fn matches(&self, command: &str) -> bool is ambiguous — no standard way to express matching logic for cargo test vs cargo nextest run, git status --porcelain vs git status, etc.
Design
pub enum CommandMatcher {
Exact(&'static str),
Prefix(&'static str),
Regex(regex::Regex),
Custom(Box<dyn Fn(&str) -> bool + Send + Sync>),
}
Updated OutputFilter trait returns &CommandMatcher via matcher() method. Registry uses filter.matcher().matches(command).
Acceptance Criteria
Parent
Epic #426, Plan:
.local/plan/m26.1-output-filtering-improvements.mdPriority: P0 (blocks Phase 1)
Problem
Current
fn matches(&self, command: &str) -> boolis ambiguous — no standard way to express matching logic forcargo testvscargo nextest run,git status --porcelainvsgit status, etc.Design
Updated
OutputFiltertrait returns&CommandMatcherviamatcher()method. Registry usesfilter.matcher().matches(command).Acceptance Criteria
CommandMatcherenum with 4 variants andmatches()methodOutputFiltertrait updated to use new matcher