Expand description
Declarative command-output filter engine.
Each filter is a pipeline of stages (strip_ansi → replace → match_output
→ strip/keep_lines → truncate_lines_at → head/tail_lines → max_lines →
on_empty). Filters are keyed by a regex over the invoking command (the
first word(s) of a Bash command — e.g. ^git\s+log).
Credits: adapted from rtk (Rust Token Killer) — rtk/src/core/toml_filter.rs.
Trust-gating, disk lookup, and per-filter inline tests from rtk have been
removed — this build only consumes compile-time-embedded rules.
MIT © Patrick Szymkowiak. See LICENSE.
Structs§
Functions§
- apply
- find_
matching - Look up the first filter matching
command. O(N) over a small list.