.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "LEI-Q 1" .TH LEI-Q 1 "1993-10-02" "public-inbox.git" "public-inbox user manual" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" lei\-q \- search for messages matching terms .SH "SYNOPSIS" .IX Header "SYNOPSIS" lei q [\s-1OPTIONS\s0] \s-1TERM\s0 [\s-1TERM...\s0] .PP lei q [\s-1OPTIONS\s0] (\-\-stdin|\-) .SH "DESCRIPTION" .IX Header "DESCRIPTION" Search for messages across the lei/store and externals. .SH "OPTIONS" .IX Header "OPTIONS" .IP "\-\-stdin" 4 .IX Item "--stdin" Read search terms from stdin. .IP "\-\-no\-save" 4 .IX Item "--no-save" Do not save the search for \fBlei\-up\fR\|(1). .IP "\-\-output=MFOLDER" 4 .IX Item "--output=MFOLDER" .PD 0 .IP "\-o \s-1MFOLDER\s0" 4 .IX Item "-o MFOLDER" .IP "\-\-mfolder=MFOLDER" 4 .IX Item "--mfolder=MFOLDER" .PD Warning: this clobbers and overwrites the output destination unless \&\*(L"\-\-augment\*(R" is specified. .Sp Destination for results (e.g., \f(CW\*(C`/tmp/results\-Maildir\*(C'\fR, \&\f(CW\*(C`imaps://user@mail.example.com/INBOX.test\*(C'\fR, or \&\f(CW\*(C`mboxcl2:/tmp/results\-mboxcl2\*(C'\fR). The prefix may be a supported protocol: \&\f(CW\*(C`imap://\*(C'\fR or \f(CW\*(C`imaps://\*(C'\fR. URLs requiring authentication use \fBgit\-credential\fR\|(1) to fill in the username and password. .Sp A prefix can specify the format of the output: \f(CW\*(C`maildir\*(C'\fR, \&\f(CW\*(C`mboxrd\*(C'\fR, \f(CW\*(C`mboxcl2\*(C'\fR, \f(CW\*(C`mboxcl\*(C'\fR, \f(CW\*(C`mboxo\*(C'\fR. For a description of mail formats, see \fBlei\-mail\-formats\fR\|(5). .Sp \&\f(CW\*(C`maildir\*(C'\fR is the default for an existing directory or non-existing path. .Sp Default: \f(CW\*(C`\-\*(C'\fR (stdout) .IP "\-\-format=FORMAT" 4 .IX Item "--format=FORMAT" .PD 0 .IP "\-f \s-1FORMAT\s0" 4 .IX Item "-f FORMAT" .PD Format of results to stdout. This option exists as a convenient way to specify the format for the default stdout destination. \&\f(CW\*(C`reply\*(C'\fR, \f(CW\*(C`text\*(C'\fR, \f(CW\*(C`json\*(C'\fR, \f(CW\*(C`jsonl\*(C'\fR, or \f(CW\*(C`concatjson\*(C'\fR are all supported, as are the various mbox variants described in \*(L"\-\-output\*(R". .Sp When a format isn't specified, it's chosen based on the \&\*(L"\-\-output\*(R" destination or prefix. \f(CW\*(C`json\*(C'\fR is used for the default destination (stdout). .Sp Using a \f(CW\*(C`format:\*(C'\fR prefix with the \f(CW\*(C`\-\-output\*(C'\fR destination is preferred when not writing to stdout. .IP "\-\-no\-color" 4 .IX Item "--no-color" Disable color (for \f(CW\*(C`\-f reply\*(C'\fR and \f(CW\*(C`\-f text\*(C'\fR). .IP "\-\-pretty" 4 .IX Item "--pretty" Pretty print \f(CW\*(C`json\*(C'\fR or \f(CW\*(C`concatjson\*(C'\fR output. If stdout is opened to a tty and used as the \f(CW\*(C`\-\-output\*(C'\fR destination, \f(CW\*(C`\-\-pretty\*(C'\fR is enabled by default. .IP "\-\-mua=COMMAND" 4 .IX Item "--mua=COMMAND" A command to run on \f(CW\*(C`\-\-output\*(C'\fR Maildir or mbox (e.g., \f(CW\*(C`mutt \-f %f\*(C'\fR). For a subset of MUAs known to accept a mailbox via \f(CW\*(C`\-f\*(C'\fR, \s-1COMMAND\s0 can be abbreviated to the name of the program: \f(CW\*(C`mutt\*(C'\fR, \f(CW\*(C`mailx\*(C'\fR, \f(CW\*(C`mail\*(C'\fR, or \f(CW\*(C`neomutt\*(C'\fR. .IP "\-\-alert=COMMAND[,COMMAND...]" 4 .IX Item "--alert=COMMAND[,COMMAND...]" Run \f(CW\*(C`COMMAND\*(C'\fR after writing to output. \f(CW\*(C`:WINCH\*(C'\fR indicates to send \&\f(CW\*(C`SIGWINCH\*(C'\fR to the \f(CW\*(C`\-\-mua\*(C'\fR process. \f(CW\*(C`:bell\*(C'\fR indicates to print a bell code. Any other value is interpreted as a command to execute as is. .Sp This option may be given multiple times. .Sp Default: \f(CW\*(C`:WINCH,:bell\*(C'\fR when \f(CW\*(C`\-\-mua\*(C'\fR is specified and \f(CW\*(C`\-\-output\*(C'\fR doesn't point to stdout, nothing otherwise. .IP "\-\-augment" 4 .IX Item "--augment" .PD 0 .IP "\-a" 4 .IX Item "-a" .PD Augment output destination instead of clobbering it. .IP "\-\-no\-import\-before" 4 .IX Item "--no-import-before" Do not import keywords before writing to an existing output destination. .IP "\-\-threads" 4 .IX Item "--threads" .PD 0 .IP "\-t" 4 .IX Item "-t" .PD Return all messages in the same thread as the actual match(es). .Sp Using this twice (\f(CW\*(C`\-tt\*(C'\fR) sets the \f(CW\*(C`flagged\*(C'\fR (\s-1AKA\s0 \*(L"important\*(R") 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. .Sp \&\s-1TODO:\s0 Warning: this flag may become persistent and saved in lei/store unless an \s-1MUA\s0 unflags it! (Behavior undecided) .IP "\-\-dedupe=STRATEGY" 4 .IX Item "--dedupe=STRATEGY" .PD 0 .IP "\-d \s-1STRATEGY\s0" 4 .IX Item "-d STRATEGY" .PD Strategy for deduplicating messages: \f(CW\*(C`content\*(C'\fR, \f(CW\*(C`oid\*(C'\fR, \f(CW\*(C`mid\*(C'\fR, or \&\f(CW\*(C`none\*(C'\fR. .Sp Default: \f(CW\*(C`content\*(C'\fR .IP "\-\-[no\-]remote" 4 .IX Item "--[no-]remote" Whether to include results requiring network access. When local externals are configured, \f(CW\*(C`\-\-remote\*(C'\fR must be explicitly passed to enable reporting of results from remote externals. .IP "\-\-no\-local" 4 .IX Item "--no-local" Limit operations to those requiring network access. .IP "\-\-no\-external" 4 .IX Item "--no-external" Don't include results from externals. .IP "\-\-include=LOCATION" 4 .IX Item "--include=LOCATION" .PD 0 .IP "\-I \s-1LOCATION\s0" 4 .IX Item "-I LOCATION" .PD Include specified external in search. This option may be given multiple times. .IP "\-\-exclude=LOCATION" 4 .IX Item "--exclude=LOCATION" Exclude specified external from search. This option may be given multiple times. .IP "\-\-only=LOCATION" 4 .IX Item "--only=LOCATION" .PD 0 .IP "\-O \s-1LOCATION\s0" 4 .IX Item "-O LOCATION" .PD Use only the specified external for search. This option may be given multiple times, in which case the search uses only the specified set. .IP "\-\-globoff" 4 .IX Item "--globoff" .PD 0 .IP "\-g" 4 .IX Item "-g" .PD Do not match locations using \f(CW\*(C`*?\*(C'\fR wildcards and \f(CW\*(C`[]\*(C'\fR ranges. This option applies to \f(CW\*(C`\-\-include\*(C'\fR, \f(CW\*(C`\-\-exclude\*(C'\fR, and \f(CW\*(C`\-\-only\*(C'\fR. .IP "\-\-no\-import\-remote" 4 .IX Item "--no-import-remote" Disable the default behavior of memoizing remote messages into the local store. .IP "\-\-lock=METHOD" 4 .IX Item "--lock=METHOD" \&\fBmbox\fR\|(5) locking method(s) to use: \f(CW\*(C`dotlock\*(C'\fR, \f(CW\*(C`fcntl\*(C'\fR, \f(CW\*(C`flock\*(C'\fR or \&\f(CW\*(C`none\*(C'\fR. .Sp Default: fcntl,dotlock .IP "\-\-limit=NUMBER" 4 .IX Item "--limit=NUMBER" .PD 0 .IP "\-NUMBER" 4 .IX Item "-NUMBER" .IP "\-n \s-1NUMBER\s0" 4 .IX Item "-n NUMBER" .PD Fuzzy limit the number of matches per-local external and lei/store. Messages added by the \-\-threads switch do not count towards this limit, and there is no limit on remote externals. .Sp Default: 10000 .IP "\-\-offset=NUMBER" 4 .IX Item "--offset=NUMBER" Shift start of search results. .Sp Default: 0 .IP "\-\-reverse" 4 .IX Item "--reverse" .PD 0 .IP "\-r" 4 .IX Item "-r" .PD Reverse the results. Note that this applies before \f(CW\*(C`\-\-limit\*(C'\fR. .IP "\-\-sort=KEY" 4 .IX Item "--sort=KEY" .PD 0 .IP "\-s \s-1KEY\s0" 4 .IX Item "-s KEY" .PD Order the results by \s-1KEY.\s0 Valid keys are \f(CW\*(C`received\*(C'\fR, \f(CW\*(C`relevance\*(C'\fR, and \f(CW\*(C`docid\*(C'\fR. .Sp Default: \f(CW\*(C`received\*(C'\fR .IP "\-\-verbose" 4 .IX Item "--verbose" .PD 0 .IP "\-v" 4 .IX Item "-v" .PD Provide more feedback on stderr. .IP "\-\-quiet" 4 .IX Item "--quiet" .PD 0 .IP "\-q" 4 .IX Item "-q" .PD Suppress feedback messages. .IP "\-\-torsocks=auto|no|yes" 4 .IX Item "--torsocks=auto|no|yes" .PD 0 .IP "\-\-no\-torsocks" 4 .IX Item "--no-torsocks" .PD Whether to wrap \fBgit\fR\|(1) and \fBcurl\fR\|(1) commands with \fBtorsocks\fR\|(1). .Sp Default: \f(CW\*(C`auto\*(C'\fR .IP "\-\-proxy=PROTOCOL://HOST[:PORT]" 4 .IX Item "--proxy=PROTOCOL://HOST[:PORT]" .SH "SEARCH TERMS" .IX Header "SEARCH TERMS" \&\f(CW\*(C`lei q\*(C'\fR supports the same search prefixes used by \s-1HTTP\s0(S) public-inbox instances: .PP .Vb 10 \& 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..\*(Aq and \& \`d:..2.days.ago\*(Aq 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\*(Aq output \& rt: match received time, like \`d:\*(Aq if sender\*(Aqs clock was correct .Ve .PP Additional search prefixes which only affect the local lei/store: .PP .Vb 2 \& L: match the given label \& kw: match the given keywords .Ve .PP See \fBlei\-tag\fR\|(1) for more info on labels and keywords. .PP Most prefixes are probabilistic, meaning they support stemming and wildcards (\f(CW\*(C`*\*(C'\fR). Ranges (such as \f(CW\*(C`d:\*(C'\fR) and boolean prefixes do not support stemming or wildcards. The upstream Xapian query parser documentation fully explains the query syntax: .SH "TIPS" .IX Header "TIPS" \&\f(CW\*(C`\-f reply\*(C'\fR is intended to aid in turning a cover letter into a reply (since using \f(CW\*(C`git format\-patch \-\-in\-reply\-to=...\*(C'\fR is tedious). Results (including \*(L"From \*(R" lines) should be edited and trimmed in your favorite \f(CW$EDITOR\fR before sending. .SH "CONTACT" .IX Header "CONTACT" Feedback welcome via plain-text mail to .PP The mail archives are hosted at and .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright all contributors .PP License: \s-1AGPL\-3.0+\s0 .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBlei\-add\-external\fR\|(1), \fBlei\-lcat\fR\|(1), \fBlei\-up\fR\|(1), Xapian::QueryParser Syntax