Expand description
Mutt-style search/limit patterns. Terms: ~f from, ~s subject,
~b body, ~t to, ~c cc, ~C to-or-cc, ~e sender, ~h any
header, ~i Message-ID, ~x References, ~d date, ~r received
date, ~m index range, ~z size range, ~= duplicate,
~N new, ~F flagged, ~D deleted, ~U unread, ~T tagged,
~l addressed to a known mailing list,
~p addressed to me, ~P sent by me, ~A every message;
a bare word matches subject or from (mutt’s
$simple_search). Adjacent terms AND, | ORs, ! negates, ()
groups; string arguments are case-insensitive regexes (quote them
to include spaces), ~d/~r take DD/MM/YYYY ranges or </>/=
offsets like <1w.
Structs§
- Matcher
- A string argument: tried as a case-insensitive regex; an invalid regex degrades to a case-insensitive substring match.
- Me
- Which addresses count as mine: the exact ones the identity layers
name (bare, lowercase) plus mutt’s
alternates, regexes over the bare address. Everything that asks “is this me?” goes through here:~pand~P, the+/T/C/Findex marks, reverse_name, the group-reply dedup, and Mail-Followup-To. - Position
- What a message needs from the list around it: its index number for
~mand whether its Message-ID repeats for~=. Matching without a list (a single color rule, say) leaves this at its default, where both terms are false. - Scope
- Everything matching needs besides the message: my own addresses
(
~p,~P), the known mailing lists (~l), and the message’s place in the list (~m,~=). - Thread
View - One message’s neighbours in the thread, by index into
envs.
Enums§
- Bound
- One end of a
~mrange: a literal number, or mutt’s.(the selected message) and$(the last), resolved at match time. - Pattern
Traits§
- EnvSource
- Where a thread term finds the other messages: a session’s list, or a plain slice in a test.
Functions§
- body_
terms - Every
~bargument in the pattern, for pre-resolving on a server. - matches
- AND of the top-level patterns.
meare my own bare lowercase addresses, for~p. - matches_
in - The full entry point:
scopeanswers the terms a lone message cannot (~p,~l,~m,~=). - matches_
via - Like
matches, with~boptionally answered byoracle(server-side IMAP search) instead of reading the file. - mentions_
duplicate - Whether the pattern has a
~=(duplicate) term anywhere: the Message-ID tally it needs costs a pass over the mailbox. - parse
- Top-level terms (implicitly ANDed, like mutt).
Type Aliases§
- Body
Oracle - Answers
~bfor a message without the local file read: Some when a server-side search already knows, None to fall back.