Skip to main content

Module or

Module or 

Source
Expand description

The OR dimension of filtering: --or-filter / --or-grep grouped by --or-group. A record passes the OR clause when every non-empty group has at least one matching condition (OR within a group, AND across groups). Required --filter/--grep are unchanged and AND’d on top.

Each OR-filter compiles to a single-spec CompiledFilter and each OR-grep to a single-pattern GrepPredicate, so the existing field/regex machinery (including case policy and records-mode evaluation) is reused verbatim.

Structs§

OrGroups
The compiled OR dimension. Empty (is_active() == false) means “no OR constraint”: both matches_* return true via all over an empty list.
OrSpecRaw
Raw, ungrouped OR-conditions collected from argv or config, before compilation. Groups are kept in first-seen order.

Constants§

DEFAULT_GROUP
Name of the implicit group that holds OR-conditions given without an explicit --or-group.

Functions§

extract_from_argv
Walk an already-expand_argv’d argv and collect OR-conditions grouped by the most recent --or-group marker (default group before any marker). Handles --flag value and --flag=value. Does not strip tokens — clap still parses them for --help and error reporting; this is the source of truth for grouping because clap’s Vec collection drops ordering.