LEI-Q(1)
okay bestie, buckle up: this is lei-q(1) from the public-inbox user manual, and itβs literally the search page for messages matching terms. No cap, itβs giving main-character search energy. π¦
πΈ NAME πΈ
lei-q β search for messages matching terms. Thatβs the whole name era. β¨
π SYNOPSIS π
lei q [OPTIONS] TERM [TERM...]
lei q [OPTIONS] (--stdin|-)
π DESCRIPTION π
Search for messages across the lei/store and externals. Thatβs the vibe β your little search goblin across local store and external sources. π
β¨ OPTIONS β¨
--stdinβ read the search terms from stdin, because typing is optional sometimes. π«Ά--no-saveβ do not save the search forlei-up(1). No archival pressure, bestie.--output=MFOLDER,-o MFOLDER,--mfolder=MFOLDERβ destination for results. Warning: this clobbers and overwrites the output destination unless--augmentis specified. Use it with stuff like"/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 usegit-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, seelei-mail-formats(5)."v2:/path/to/inbox"may be used to create a new inbox ofpublic-inbox-v2-format(5). The new inbox will not be configured in thepublic-inbox-config(5)file."maildir"is the default for an existing directory or non-existing path. Default:"-"(stdout).--format=FORMAT,-f FORMATβ format of results to stdout. This option exists as a convenient way to specify the format for the default stdout destination."reply","text","json","jsonl", or"concatjson"are all supported, as are the various mbox variants described in--output. When a format isnβt specified, itβs chosen based on the--outputdestination or prefix."json"is used for the default destination (stdout). Using a"format:"prefix with the--outputdestination is preferred when not writing to stdout.--no-colorβ disable color (for-f replyand-f text). Your retinas can chill.--prettyβ pretty-print"json"or"concatjson"output. If stdout is opened to a tty and used as the--outputdestination,--prettyis enabled by default. Slay.--mua=COMMANDβ a command to run on--outputMaildir or mbox (e.g.,"mutt -f %f"). For a subset of MUAs known to accept a mailbox via-f, COMMAND can be abbreviated to the name of the program:"mutt","mailx","mail", or"neomutt".--alert=COMMAND[,COMMAND...]β run"COMMAND"after writing to output.":WINCH"indicates to send"SIGWINCH"to the--muaprocess.":bell"indicates to print a bell code. Any other value is interpreted as a command to execute as is. This option may be given multiple times. Default:":WINCH,:bell"when--muais specified and--outputdoesnβt point to stdout, nothing otherwise.--augment,-aβ augment output destination instead of clobbering it. Respectful queen behavior.--no-import-beforeβ do not import messages before writing to an existing output destination. Be certain you do not need existing data in your output before using this; it permanently erases data unless--augmentis used. This is a big-deal warning, bestie. π--threads,-tβ return all messages in the same thread as the actual match(es). 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 inlei/storeunless an MUA unflags it! (Behavior undecided). Caveat:-ttonly works on locally-indexed messages at the moment, and not on remote (HTTP(S)) endpoints.--thread-id=MSGID,-T MSGIDβ only search messages in the same thread as the given Message-ID. For HTTP(S) externals, this only works on instances running public-inbox 2.0+ (UNRELEASED).--jobs=QUERY_WORKERS[,WRITE_WORKERS],--jobs=,WRITE_WORKERS,-j QUERY_WORKERS[,WRITE_WORKERS],-j ,WRITE_WORKERSβ set the number of query and write worker processes for parallelism."QUERY_WORKERS"defaults to the number of CPUs available, but 4 per remote (HTTP/HTTPS) host."WRITE_WORKERS"defaults to 75% of the number of CPUs available for Maildir and mbox* destinations, but 4 per IMAP/IMAPS host. Omitting"QUERY_WORKERS"but leaving the comma (",") allows one to only set"WRITE_WORKERS".--dedupe=STRATEGY,-d STRATEGYβ strategy for deduplicating messages:"content","oid","mid", or"none". Default:"content".--[no-]remoteβ whether to include results requiring network access. When local externals are configured,--remotemust be explicitly passed to enable reporting of results from remote externals.--no-localβ limit operations to those requiring network access.--no-externalβ donβt include results from externals.--include=LOCATION,-I LOCATIONβ include specified external in search. This option may be given multiple times.--exclude=LOCATIONβ exclude specified external from search. This option may be given multiple times.--only=LOCATION,-O LOCATIONβ use only the specified external for search. This option may be given multiple times, in which case the search uses only the specified set.--globoff,-gβ do not match locations using"*?"wildcards and"[]"ranges. This option applies to--include,--exclude, and--only.--no-import-remoteβ disable the default behavior of memoizing remote messages into the local store.--lock=METHODβmbox(5)locking method(s) to use:"dotlock","fcntl","flock"or"none". Default:fcntl,dotlock.--limit=NUMBER,-NUMBER,-n NUMBERβ fuzzy-limit the number of matches per local external andlei/store. Messages added by the--threadsswitch do not count towards this limit, and there is no limit on remote externals. Default:10000.--offset=NUMBERβ shift start of search results. Default:0.--reverse,-rβ reverse the results. Note that this applies before--limit.--sort=KEY,-s KEYβ order the results by KEY. Valid keys are"received","relevance", and"docid". Default:"received".--verbose,-vβ provide more feedback on stderr.--quiet,-qβ suppress feedback messages.--torsocks=auto|no|yes,--no-torsocksβ whether to wrapgit(1)andcurl(1)commands withtorsocks(1). Default:"auto".--proxy=PROTOCOL://HOST[:PORT]β the original page lists this one without extra prose, so Iβm not inventing details; itβs literally this option signature and nothing more in the source. π«Ά
π SEARCH TERMS π
lei q supports the same search prefixes used by HTTP(S) public-inbox instances. Hereβs the whole menu, bestie:
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>.
π‘ TIPS π‘
okay so -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. Thatβs the whole tip, and itβs giving βedit before you send, bestie.β π
π¬ CONTACT π¬
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 π
Copyright all contributors <mailto:meta@public-inbox.org>
License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
π SEE ALSO π
lei-add-external(1), lei-lcat(1), lei-up(1), Xapian::QueryParser Syntax <https://xapian.org/docs/queryparser.html>
kisses and good luck searching, bestie π β this came from public-inbox.git, dated 1993-10-02, and yeah, itβs the LEI-Q(1) page. periodt. π«Ά
π¦ where this page comes from
- arch rolling: lei 2.1.0-2 Β· AGPL
- nixos 26.05: perl5.42.3-public-inbox 2.1.0
- nixpkgs unstable: perl5.42.3-public-inbox 2.1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms