use %etcdir% for spacing instead of hardcoding
[mmh] / man / flist.man
1 .\"
2 .\" %nmhwarning%
3 .\" $Id$
4 .\"
5 .TH FLIST %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
6 .SH NAME
7 flist, flists \- list the number of messages in given sequence(s)
8 .SH SYNOPSIS
9 .HP 5
10 .na
11 .B flist
12 .RI [ +folder1
13 .RI [ +folder2
14 \&...]]
15 .RB [ \-sequence
16 .I name1
17 .RB [ \-sequence
18 .I name2
19 \&...]]
20 .RB [ \-all " | " \-noall ]
21 .RB [ \-showzero " | " \-noshowzero ]
22 .RB [ \-recurse " | " \-norecurse ]
23 .RB [ \-fast " | " \-nofast ]
24 .RB [ \-alpha " | " \-noalpha ]
25 .RB [ \-version ]
26 .RB [ \-help ]
27 .PP
28 .HP 5
29 .B flists
30 is equivalent to
31 .B flist
32 .B \-all
33 .ad
34 .SH DESCRIPTION
35 .B Flist
36 is used to search a list of folders and display the number
37 of messages in these folders that are in a given sequence or set of
38 sequences (for example the
39 .RI \*(lq unseen \*(rq
40 sequence). This is especially
41 useful if you use some mechanism such as
42 .B slocal
43 or
44 .B procmail
45 (typically in conjunction with
46 .BR rcvstore )
47 to pre-sort your mail into different folders before you view it.
48 .PP
49 By default, the command
50 .B flist
51 will search the current folder for the given sequence or sequences (usually
52 .RI \*(lq unseen \*(rq).
53 If (possibly multiple) folders are specified on the command line with
54 .IR +folder ,
55 then all these folders are searched for the given sequence(s).
56 .B Flist
57 will display for each folder searched, the number of messages in each of the
58 specified sequences, and the total number of messages.
59 .PP
60 The option
61 .B \-sequence
62 is used to specify the name of a sequence in
63 which to search for.  This option may be used multiple times to specify
64 multiple sequences.  If this is not given, then the default is to search
65 for all the sequences specified by the
66 .RI \*(lq Unseen-Sequence \*(rq
67 profile component. For more details about sequences, read the
68 .BR mh\-sequence (5)
69 man page.
70 .PP
71 Typically,
72 .B flist
73 will produce a line for each sequence, for every
74 folder that is searched, even those which do not contain any messages in
75 the given sequence.  Specifying
76 .B \-noshowzero
77 will cause
78 .B flist
79 to print only those folder/sequence combinations such the folder has a non-zero
80 number of messages in the given specified sequence.
81 .PP
82 If
83 .B \-recurse
84 is given, then for each folder that is search,
85 .B flist
86 will also recursively descend into those folders to search subfolders
87 for the given sequence.
88 .PP
89 If
90 .B \-fast
91 is given, only the names of the folders searched will be displayed, and
92 .B flist
93 will suppress all other output.  If this option is used in conjunction with
94 .BR \-noshowzero ,
95 then
96 .B flist
97 will only print the names of those folders searched that contain messages in
98 in at least one of the specified sequences.
99
100 .SS "Multiple Folders"
101 If the option
102 .B \-all
103 is given (and no folders are specified with
104 .IR +folder ),
105 then
106 .B flist
107 will search all the folders in the top
108 level of the users nmh directory.  These folders are all preceded by
109 the read\-only folders, which occur as
110 .RI \*(lq atr\-cur\- \*(rq
111 entries in the user's
112 .B nmh
113 context.
114 .PP
115 An example of the output of
116 .B flist
117 .B \-all
118 is:
119 .PP
120 .RS 5
121 .nf
122 /work/Mail  has  5 in sequence unseen (private); out of  46
123 inbox+      has 10 in sequence unseen          ; out of 153
124 junklist    has  0 in sequence unseen          ; out of  63
125 postmaster  has  1 in sequence unseen          ; out of   3
126 .fi
127 .RE
128 .PP
129 The \*(lq+\*(rq after
130 .I inbox
131 indicates that it is the current folder.
132 .PP
133 The \*(lqprivate\*(rq flag indicates that the given sequence for
134 that folder is private.  See the
135 .BR mh\-sequence (5)
136 man page for details about private sequences.
137 .PP
138 If the option
139 .B \-all
140 and
141 .I +folder
142 are both specified, then
143 .B flist
144 will search this folder, and all its first level subfolders for the
145 given sequence.  You may specify multiple folders in this way.
146 .PP
147 If
148 .B flist
149 is invoked by a name ending with \*(lqs\*(rq
150 (e.g.
151 .BR flists ),
152 then the switch
153 .B \-all
154 is assumed by default.
155 .PP
156 The sorting order for the listing is alphabetical (with
157 .BR \-alpha ),
158 or in a priority order defined by the
159 .RI \*(lq Flist-Order \*(rq
160 profile entry (with
161 .BR \-noalpha ).
162 Each item in the
163 .RI \*(lq Flist-Order \*(rq
164 is a folder name or a
165 folder name pattern that uses * to match zero or more characters.
166 Longer matching patterns have precedence over shorter matching patterns.
167 For example:
168 .PP
169 .RS 5
170 .nf
171 Flist-Order: personal petproject mh* * admin *junk
172 .fi
173 .RE
174 .PP
175 This order puts a few interesting folders first, such as those with mail
176 addressed to you personally, those about a pet project, and those about
177 mh-related things.  It places uninteresting folders at the end, and it
178 puts everything else in the middle in alphabetical order.
179
180 .SH FILES
181 .fc ^ ~
182 .nf
183 .ta \w'%etcdir%/ExtraBigFileName  'u
184 ^$HOME/\&.mh\(ruprofile~^The user profile
185 .fi
186
187 .SH "PROFILE COMPONENTS"
188 .fc ^ ~
189 .nf
190 .ta 2.4i
191 .ta \w'ExtraBigProfileName  'u
192 ^Path:~^To determine the user's nmh directory
193 ^mh-sequences:~^File that contains public sequences
194 ^Unseen-Sequence:~^The name of the unseen message sequence
195 ^Flist-Order:~^To sort folders by priority
196 .fi
197
198 .SH "SEE ALSO"
199 folder(1), rcvstore(1), slocal(1), mh\-sequence(5)
200
201 .SH DEFAULTS
202 .nf
203 .RB ` -sequence "' defaults to Unseen-Sequence profile entry"
204 .RB ` \-showzero '
205 .RB ` \-noall '
206 .RB ` \-norecurse '
207 .RB ` \-noalpha '
208 .RB ` \-nofast '
209 .fi
210
211 .SH CONTEXT
212 If
213 .I +folder
214 is given, it will become the current folder.
215 If multiple folders are given, the last one specified will
216 become the current folder.