3 lei-q - search for messages matching terms
7 lei q [OPTIONS] TERM [TERM...]
9 lei q [OPTIONS] --stdin
13 Search for messages across the lei store and externals.
15 TODO: Give common prefixes, or at least a description/reference.
19 TODO: mention curl options?
25 Read search terms from stdin.
27 =item -o MFOLDER, --output=MFOLDER, --mfolder=MFOLDER
29 Destination for results (e.g., C<path/to/Maildir> or - for stdout).
33 =item -f FORMAT, --format=FORMAT
35 Format of results: C<maildir>, C<mboxrd>, C<mboxcl2>, C<mboxcl>,
36 C<mboxo>, C<json>, C<jsonl>, or C<concatjson>. The default format
37 used depends on C<--output>.
39 TODO: Provide description of formats?
43 Pretty print C<json> or C<concatjson> output. If stdout is opened to
44 a tty and used as the C<--output> destination, C<--pretty> is enabled
49 A command to run on C<--output> Maildir or mbox (e.g., C<mutt -f %f>).
50 For a subset of MUAs known to accept a mailbox via C<-f>, COMMAND can
51 be abbreviated to the name of the program: C<mutt>, C<mailx>, C<mail>,
54 =item --alert=COMMAND[,COMMAND...]
56 Run C<COMMAND> after writing to output. C<:WINCH> indicates to send
57 C<SIGWINCH> to the C<--mua> process. C<:bell> indicates to print a
58 bell code. Any other value is interpreted as a command to execute as
61 This option may be given multiple times.
63 Default: C<:WINCH,:bell> when C<--mua> is specified and C<--output>
64 doesn't point to stdout, nothing otherwise.
68 Augment output destination instead of clobbering it.
72 Return all messages in the same thread as the actual match(es).
74 =item -d STRATEGY, --dedupe=STRATEGY
76 Strategy for deduplicating messages: C<content>, C<oid>, C<mid>, or
81 TODO: Provide description of strategies?
85 Whether to include results requiring network access. When local
86 externals are configured, C<--remote> must be explicitly passed to
87 enable reporting of results from remote externals.
91 Limit operations to those requiring network access.
95 Don't include results from externals.
97 =item -I LOCATION, --include=LOCATION
99 Include specified external in search. This option may be given
102 =item --exclude=LOCATION
104 Exclude specified external from search. This option may be given
107 =item --only=LOCATION
109 Use only the specified external for search. This option may be given
110 multiple times, in which case the search uses only the specified set.
114 Do not match locations using C<*?> wildcards and C<[]> ranges. This
115 option applies to C<--include>, C<--exclude>, and C<--only>.
117 =item -NUMBER, -n NUMBER, --limit=NUMBER
119 Limit the number of matches.
123 =item --offset=NUMBER
125 Shift start of search results.
131 Reverse the results. Note that this applies before C<--limit>.
133 =item -s KEY, --sort=KEY
135 Order the results by KEY. Valid keys are C<received>, C<relevance>,
142 Provide more feedback on stderr.
146 Suppress feedback messages.
148 =item --torsocks=auto|no|yes, --no-torsocks
150 Whether to wrap L<git(1)> and L<curl(1)> commands with torsocks.
158 Feedback welcome via plain-text mail to L<mailto:meta@public-inbox.org>
160 The mail archives are hosted at L<https://public-inbox.org/meta/>
161 and L<http://hjrcffqmbrq6wope.onion/meta/>
165 Copyright 2021 all contributors L<mailto:meta@public-inbox.org>
167 License: AGPL-3.0+ L<https://www.gnu.org/licenses/agpl-3.0.txt>
171 L<lei-add-external(1)>,
172 L<Xapian::QueryParser Syntax|https://xapian.org/docs/queryparser.html>