LEI-Q(1) | public-inbox user manual | LEI-Q(1) |
lei-q - search for messages matching terms
lei q [OPTIONS] TERM [TERM...]
lei q [OPTIONS] (--stdin|-)
Search for messages across the lei/store and externals.
Destination for results (e.g., "/tmp/results-Maildir", "imaps://user@mail.example.com/INBOX.test", or "mboxcl2:/tmp/results-mboxcl2"). The prefix may be a supported protocol: "imap://" or "imaps://". URLs requiring authentication use git-credential(1) to fill in the username and password.
A prefix can specify the format of the output: "maildir", "mboxrd", "mboxcl2", "mboxcl", "mboxo". For a description of mail formats, see lei-mail-formats(5).
"maildir" is the default for an existing directory or non-existing path.
Default: "-" (stdout)
When a format isn't specified, it's chosen based on the "--output" destination or prefix. "json" is used for the default destination (stdout).
Using a "format:" prefix with the "--output" destination is preferred when not writing to stdout.
This option may be given multiple times.
Default: ":WINCH,:bell" when "--mua" is specified and "--output" doesn't point to stdout, nothing otherwise.
Using this twice ("-tt") sets the "flagged" (AKA "important") on messages which were actual matches. This is useful to distinguish messages which were direct hits from messages which were merely part of the same thread.
TODO: Warning: this flag may become persistent and saved in lei/store unless an MUA unflags it! (Behavior undecided)
Default: "content"
Default: fcntl,dotlock
Default: 10000
Default: 0
Default: "received"
Default: "auto"
"lei q" supports the same search prefixes used by HTTP(S) public-inbox instances:
s: match within Subject e.g. s:"a quick brown fox" d: match date-time range, git "approxidate" formats supported Open-ended ranges such as `d:last.week..' and `d:..2.days.ago' are supported b: match within message body, including text attachments nq: match non-quoted text within message body q: match quoted text within message body n: match filename of attachment(s) t: match within the To header c: match within the Cc header f: match within the From header a: match within the To, Cc, and From headers tc: match within the To and Cc headers l: match contents of the List-Id header bs: match within the Subject and body dfn: match filename from diff dfa: match diff removed (-) lines dfb: match diff added (+) lines dfhh: match diff hunk header context (usually a function name) dfctx: match diff context lines dfpre: match pre-image git blob ID dfpost: match post-image git blob ID dfblob: match either pre or post-image git blob ID patchid: match `git patch-id --stable' output rt: match received time, like `d:' if sender's clock was correct
Additional search prefixes which only affect the local lei/store:
L: match the given label kw: match the given keywords
See lei-tag(1) for more info on labels and keywords.
Most prefixes are probabilistic, meaning they support stemming and wildcards ("*"). Ranges (such as "d:") and boolean prefixes do not support stemming or wildcards. The upstream Xapian query parser documentation fully explains the query syntax: <https://xapian.org/docs/queryparser.html>
"-f reply" is intended to aid in turning a cover letter into a reply (since using "git format-patch --in-reply-to=..." is tedious). Results (including "From " lines) should be edited and trimmed in your favorite $EDITOR before sending.
Feedback welcome via plain-text mail to <mailto:meta@public-inbox.org>
The mail archives are hosted at <https://public-inbox.org/meta/> and <http://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/meta/>
Copyright all contributors <mailto:meta@public-inbox.org>
License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
lei-add-external(1), lei-lcat(1), lei-up(1), Xapian::QueryParser Syntax <https://xapian.org/docs/queryparser.html>
1993-10-02 | public-inbox.git |