4 .TH PICK %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
6 pick \- select messages by content
47 .RI [ +folder ] messages "|" files ]
51 .RB [ \-public " | " \-nopublic ]
52 .RB [ \-zero " | " \-nozero ]
53 .RB [ \-list " | " \-nolist ]
62 scan\0`pick\0\-from\0jones`
63 pick\0\-to\0holloway\0\-sequence\0select
64 show\0`pick\0\-before\0friday`
70 searches within a folder for messages with the specified
71 contents, and then identifies those messages. Two types of search
72 primitives are available: pattern matching and date constraint
77 is used to perform the matching, so the
78 full regular expression (see
86 is used directly, and with the others, the grep pattern constructed is:
89 `component[ \\t]*:\&.*pattern'
92 This means that the pattern specified for a
95 everywhere in the message, including the header and the body, while
96 the other pattern matching requests are limited to the single specified
97 component. The expression
100 `\-\|\-component\ pattern'
103 is a shorthand for specifying
106 `\-search `component[ \\t]*:\&.*pattern'\ '
109 It is used to pick a component which is not one of `To:',
110 `Cc:', `Date:', `From:', or `Subject:'.
112 .RB ` "pick\0\-\|\-reply\-to\0pooh" '.
114 Pattern matching is performed on a per\-line basis. Within the header
115 of the message, each component is treated as one long line, but in the
116 body, each line is separate. Lower\-case letters in the search pattern
117 will match either lower or upper case in the message, while upper case
118 will match only upper case.
122 switch is a pattern matching operation (as
123 described above), to find messages sent on a certain date the pattern
124 string must match the text of the `Date:' field of the message.
126 Independent of any pattern matching operations requested, the switches
132 may also be used to introduce date/time
133 constraints on all of the messages. By default, the `Date:'
134 field is consulted, but if another date yielding field (such as
135 `BB\-Posted:' or `Delivery\-Date:') should be used, the
145 will actually parse the date
146 fields in each of the messages specified in `msgs' and compare them
147 to the date/time specified. If
149 is given, then only those
150 messages whose `Date:' field value is chronologically after the
151 date specified will be considered. The
154 complimentary action.
160 switches take legal 822\-style date
161 specifications as arguments.
163 will default certain missing
164 fields so that the entire date need not be specified. These fields
165 are (in order of defaulting): timezone, time and timezone, date, date
166 and timezone. All defaults are taken from the current date, time,
169 In addition to 822\-style dates,
171 will also recognize any of
172 the days of the week (`sunday', `monday', and so on),
173 and the special dates `today', `yesterday' (24 hours
174 ago), and `tomorrow' (24 hours from now). All days of the
175 week are judged to refer to a day in the past (e.g., telling \fIpick\fR
176 `saturday' on a `tuesday' means `last\ saturday'
177 not `this\ saturday').
178 Further more, dates in a simplified ISO 8601/RFC 3339 style (e.g.
179 `YYYY-MM-DD' or `YYYY-MM-DD hh:mm:ss') are accepted.
180 Finally, in addition to these special specifications,
183 also honor a date specification of the form `\-\fIddd\fR', which means
184 `\fIddd\fR days ago'.
193 identifies the messages of the last thirty days.
196 supports complex boolean operations on the searching primitives
210 pick\0\-after\0yesterday\0\-and
211 \-lbrace\0\-from\0freida\0\-or\0\-from\0fear\0\-rbrace
215 identifies messages recently sent by `frieda' or `fear'.
217 The matching primitives take precedence over the
219 switch, which in turn takes precedence over
221 which in turn takes precedence
224 To override the default precedence, the
228 switches are provided, which act just like opening and closing
229 parentheses in logical expressions.
231 If no search criteria are given, all the messages specified on the
232 command line are selected (this defaults to `all').
234 Once the search has been performed, if the
237 message numbers of the selected messages are written to the standard
238 output separated by newlines. This is
241 quickly generating arguments for other
243 programs by using the
244 `backquoting' syntax of the shell. For example, the command
247 scan\0`pick\0+todo\0\-after\0`31 Mar 83 0123 PST'`
252 those messages in the indicated folder which meet the
253 appropriate criterion. Note that since
256 are written out prior to
258 invocation, you need not give
259 the folder argument to
266 switch may be given once for each sequence the user wishes to define.
267 For each sequence named, that sequence will be defined to mean exactly
268 those messages selected by
273 pick\0\-from\0frated\0\-seq\0fred
276 defines a new message sequence for the current folder called
277 `fred' which contains exactly those messages that were selected.
281 will zero the sequence before adding it. This
282 action can be disabled with the
284 switch, which means that the
287 will be added to the sequence, if it
288 already exists, and any messages already a part of that sequence will
305 .ta \w'%etcdir%/ExtraBigFileName 'u
306 ^$HOME/.mmh/profile~^The user profile
309 .SH "PROFILE COMPONENTS"
313 .ta \w'ExtraBigProfileName 'u
314 ^Path:~^To determine the user's mail storage
315 ^Current\-Folder:~^To find the default current folder
323 .RB ` +folder "' defaults to the current folder"
324 .RB ` msgs "' defaults to all"
325 .RB ` "\-datefield date" '
327 .RB ` \-list "' is the default if no `\-sequence', `\-nolist' otherwise"
331 If a folder is given, it will become the current folder.
334 In previous versions of
343 the selected messages. This was rather
344 `inverted logic' from the UNIX point of view, so
346 was changed to define sequences and output those sequences. Hence,
348 can be used to generate the arguments for all other
350 commands, instead of giving
352 endless switches for invoking those commands
355 Also, previous versions of
357 balked if you didn't specify
358 a search string or a date/time constraint. The current version does
359 not, and merely matches the messages you specify. This lets you type
363 show\0`pick\0l:20\0\-seq\0fear`
370 mark\0\-add\0\-nozero\0\-seq\0fear\0l:20
375 Finally, timezones used to be ignored when comparing dates: they aren't
380 .RB ` "pick sequence \-list" '
381 to enumerate the messages in a sequence
382 (such as for use by a shell script).
387 must occur prior to the
391 switch it applies to.
395 is used in a back\-quoted operation, such as
398 scan\0`pick\0\-from\0jones`
403 selects no messages (e.g., no messages are from
404 `jones'), then the shell will still run the outer command (e.g.,
406 Since no messages were matched,
409 no output, and the argument given to the outer command as a result of
412 is empty. In the case of
415 the outer command now acts as if the default `msg' or `msgs' should be
416 used (e.g., `all' in the case of
419 unexpected behavior, if
421 was given, and if its standard output is not a tty, then
423 outputs the illegal message number `0'
424 when it fails. This lets the outer command fail gracefully as well.
426 The pattern syntax `[l-r]' is not supported; each letter to be
427 matched must be included within the square brackets.