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
30 C<mboxcl2:path/to/mbox>). The format can be specified by adding a
31 C<E<lt>formatE<gt>:> prefix with any of these values: C<maildir>,
32 C<mboxrd>, C<mboxcl2>, C<mboxcl>, C<mboxo>, C<json>, C<jsonl>, or
35 TODO: Provide description of formats?
37 When a format isn't specified, it's chosen based on the destination.
38 C<json> is used for the default destination (stdout), and C<maildir>
39 is used for an existing directory or non-existing path.
43 =item -f FORMAT, --format=FORMAT
45 Format of results. This option exists as a convenient way to specify
46 the format for the default stdout destination. Using a C<format:>
47 prefix with the C<--output> destination is preferred otherwise.
51 Pretty print C<json> or C<concatjson> output. If stdout is opened to
52 a tty and used as the C<--output> destination, C<--pretty> is enabled
57 A command to run on C<--output> Maildir or mbox (e.g., C<mutt -f %f>).
58 For a subset of MUAs known to accept a mailbox via C<-f>, COMMAND can
59 be abbreviated to the name of the program: C<mutt>, C<mailx>, C<mail>,
62 =item --alert=COMMAND[,COMMAND...]
64 Run C<COMMAND> after writing to output. C<:WINCH> indicates to send
65 C<SIGWINCH> to the C<--mua> process. C<:bell> indicates to print a
66 bell code. Any other value is interpreted as a command to execute as
69 This option may be given multiple times.
71 Default: C<:WINCH,:bell> when C<--mua> is specified and C<--output>
72 doesn't point to stdout, nothing otherwise.
76 Augment output destination instead of clobbering it.
80 Return all messages in the same thread as the actual match(es).
82 =item -d STRATEGY, --dedupe=STRATEGY
84 Strategy for deduplicating messages: C<content>, C<oid>, C<mid>, or
89 TODO: Provide description of strategies?
93 Whether to include results requiring network access. When local
94 externals are configured, C<--remote> must be explicitly passed to
95 enable reporting of results from remote externals.
99 Limit operations to those requiring network access.
103 Don't include results from externals.
105 =item -I LOCATION, --include=LOCATION
107 Include specified external in search. This option may be given
110 =item --exclude=LOCATION
112 Exclude specified external from search. This option may be given
115 =item --only=LOCATION
117 Use only the specified external for search. This option may be given
118 multiple times, in which case the search uses only the specified set.
122 Do not match locations using C<*?> wildcards and C<[]> ranges. This
123 option applies to C<--include>, C<--exclude>, and C<--only>.
125 =item -NUMBER, -n NUMBER, --limit=NUMBER
127 Limit the number of matches.
131 =item --offset=NUMBER
133 Shift start of search results.
139 Reverse the results. Note that this applies before C<--limit>.
141 =item -s KEY, --sort=KEY
143 Order the results by KEY. Valid keys are C<received>, C<relevance>,
150 Provide more feedback on stderr.
154 Suppress feedback messages.
156 =item --torsocks=auto|no|yes, --no-torsocks
158 Whether to wrap L<git(1)> and L<curl(1)> commands with torsocks.
166 Feedback welcome via plain-text mail to L<mailto:meta@public-inbox.org>
168 The mail archives are hosted at L<https://public-inbox.org/meta/>
169 and L<http://hjrcffqmbrq6wope.onion/meta/>
173 Copyright 2021 all contributors L<mailto:meta@public-inbox.org>
175 License: AGPL-3.0+ L<https://www.gnu.org/licenses/agpl-3.0.txt>
179 L<lei-add-external(1)>,
180 L<Xapian::QueryParser Syntax|https://xapian.org/docs/queryparser.html>