]> git.notmuchmail.org Git - notmuch/blob - man/man1/notmuch-search.1
initial splitting of notmuch.1
[notmuch] / man / man1 / notmuch-search.1
1 .TH NOTMUCH-SEARCH 1 2011-12-04 "Notmuch 0.10.2"
2 .SH NAME
3 notmuch-search \- Search for messages matching the given search terms.
4 .SH SYNOPSIS
5
6 .B notmuch search
7 .RI  [  options "...] <" search-term ">..."
8
9 .SH DESCRIPTION
10
11 Search for messages matching the given search terms, and display as
12 results the threads containing the matched messages.
13
14 The output consists of one line per thread, giving a thread ID, the
15 date of the newest (or oldest, depending on the sort option) matched
16 message in the thread, the number of matched messages and total
17 messages in the thread, the names of all participants in the thread,
18 and the subject of the newest (or oldest) message.
19
20 Supported options for
21 .B search
22 include
23 .RS 4
24 .TP 4
25 .BR \-\-format= ( json | text )
26
27 Presents the results in either JSON or plain-text (default).
28 .RE
29
30 .RS 4
31 .TP 4
32 .B \-\-output=(summary|threads|messages|files|tags)
33
34 .RS 4
35 .TP 4
36 .B summary
37
38 Output a summary of each thread with any message matching the search
39 terms. The summary includes the thread ID, date, the number of
40 messages in the thread (both the number matched and the total number),
41 the authors of the thread and the subject.
42 .RE
43 .RS 4
44 .TP 4
45 .B threads
46
47 Output the thread IDs of all threads with any message matching the
48 search terms, either one per line (\-\-format=text) or as a JSON array
49 (\-\-format=json).
50 .RE
51 .RS 4
52 .TP 4
53 .B messages
54
55 Output the message IDs of all messages matching the search terms,
56 either one per line (\-\-format=text) or as a JSON array
57 (\-\-format=json).
58 .RE
59 .RS 4
60 .TP 4
61 .B files
62
63 Output the filenames of all messages matching the search terms, either
64 one per line (\-\-format=text) or as a JSON array (\-\-format=json).
65 .RE
66 .RS 4
67 .TP 4
68 .B tags
69
70 Output all tags that appear on any message matching the search terms,
71 either one per line (\-\-format=text) or as a JSON array
72 (\-\-format=json).
73 .RE
74 .RE
75
76 .RS 4
77 .TP 4
78 .BR \-\-sort= ( newest\-first | oldest\-first )
79
80 This option can be used to present results in either chronological order
81 .RB ( oldest\-first )
82 or reverse chronological order
83 .RB ( newest\-first ).
84
85 Note: The thread order will be distinct between these two options
86 (beyond being simply reversed). When sorting by
87 .B oldest\-first
88 the threads will be sorted by the oldest message in each thread, but
89 when sorting by
90 .B newest\-first
91 the threads will be sorted by the newest message in each thread.
92
93 By default, results will be displayed in reverse chronological order,
94 (that is, the newest results will be displayed first).
95 .RE
96
97 .RS 4
98 .TP 4
99 .BR \-\-offset=[\-]N
100
101 Skip displaying the first N results. With the leading '\-', start at the Nth
102 result from the end.
103 .RE
104
105 .RS 4
106 .TP 4
107 .BR \-\-limit=N
108
109 Limit the number of displayed results to N.
110 .RE
111
112 .RS 4
113 See the
114 .B "SEARCH SYNTAX"
115 section below for details of the supported syntax for <search-terms>.
116 .RE