4 .TH PICK %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
6 pick \- search for messages by content
45 .RB [ \-public " | " \-nopublic ]
46 .RB [ \-zero " | " \-nozero ]
47 .RB [ \-list " | " \-nolist ]
55 scan\0`pick\0\-from\0jones`
56 pick\0\-to\0holloway\0\-sequence\0select
57 show\0`pick\0\-before\0friday`
63 searches within a folder for messages with the specified
64 contents, and then identifies those messages. Two types of search
65 primitives are available: pattern matching and date constraint
70 is used to perform the matching, so the
71 full regular expression (see
79 is used directly, and with the others, the grep pattern constructed is:
82 `component[ \\t]*:\&.*pattern'
85 This means that the pattern specified for a
88 everywhere in the message, including the header and the body, while
89 the other pattern matching requests are limited to the single specified
90 component. The expression
93 `\-\|\-component\ pattern'
96 is a shorthand for specifying
99 `\-search \*(lqcomponent[ \\t]*:\&.*pattern\*(rq\ '
102 It is used to pick a component which is not one of \*(lqTo:\*(rq,
103 \*(lqcc:\*(rq, \*(lqDate:\*(rq, \*(lqFrom:\*(rq, or \*(lqSubject:\*(rq.
105 .RB \*(lq "pick\0\-\|\-reply\-to\0pooh" \*(rq.
107 Pattern matching is performed on a per\-line basis. Within the header
108 of the message, each component is treated as one long line, but in the
109 body, each line is separate. Lower\-case letters in the search pattern
110 will match either lower or upper case in the message, while upper case
111 will match only upper case.
115 switch is a pattern matching operation (as
116 described above), to find messages sent on a certain date the pattern
117 string must match the text of the \*(lqDate:\*(rq field of the message.
119 Independent of any pattern matching operations requested, the switches
125 may also be used to introduce date/time
126 constraints on all of the messages. By default, the \*(lqDate:\*(rq
127 field is consulted, but if another date yielding field (such as
128 \*(lqBB\-Posted:\*(rq or \*(lqDelivery\-Date:\*(rq) should be used, the
138 will actually parse the date
139 fields in each of the messages specified in `msgs' and compare them
140 to the date/time specified. If
142 is given, then only those
143 messages whose \*(lqDate:\*(rq field value is chronologically after the
144 date specified will be considered. The
147 complimentary action.
153 switches take legal 822\-style date
154 specifications as arguments.
156 will default certain missing
157 fields so that the entire date need not be specified. These fields
158 are (in order of defaulting): timezone, time and timezone, date, date
159 and timezone. All defaults are taken from the current date, time,
162 In addition to 822\-style dates,
164 will also recognize any of
165 the days of the week (\*(lqsunday\*(rq, \*(lqmonday\*(rq, and so on),
166 and the special dates \*(lqtoday\*(rq, \*(lqyesterday\*(rq (24 hours
167 ago), and \*(lqtomorrow\*(rq (24 hours from now). All days of the
168 week are judged to refer to a day in the past (e.g., telling \fIpick\fR
169 \*(lqsaturday\*(rq on a \*(lqtuesday\*(rq means \*(lqlast\ saturday\*(rq
170 not \*(lqthis\ saturday\*(rq).
172 Finally, in addition to these special specifications,
175 also honor a specification of the form \*(lq\-dd\*(rq, which means
176 \*(lqdd days ago\*(rq.
179 supports complex boolean operations on the searching primitives
193 pick\0\-after\0yesterday\0\-and
194 \-lbrace\0\-from\0freida\0\-or\0\-from\0fear\0\-rbrace
198 identifies messages recently sent by \*(lqfrieda\*(rq or \*(lqfear\*(rq.
200 The matching primitives take precedence over the
202 switch, which in turn takes precedence over
204 which in turn takes precedence
207 To override the default precedence, the
211 switches are provided, which act just like opening and closing
212 parentheses in logical expressions.
214 If no search criteria are given, all the messages specified on the
215 command line are selected (this defaults to \*(lqall\*(rq).
217 Once the search has been performed, if the
220 message numbers of the selected messages are written to the standard
221 output separated by newlines. This is
224 quickly generating arguments for other
226 programs by using the
227 \*(lqbackquoting\*(rq syntax of the shell. For example, the command
230 scan\0`pick\0+todo\0\-after\0\*(lq31 Mar 83 0123 PST\*(rq`
235 those messages in the indicated folder which meet the
236 appropriate criterion. Note that since
239 are written out prior to
241 invocation, you need not give
242 the folder argument to
249 switch may be given once for each sequence the user wishes to define.
250 For each sequence named, that sequence will be defined to mean exactly
251 those messages selected by
256 pick\0\-from\0frated\0\-seq\0fred
259 defines a new message sequence for the current folder called
260 \*(lqfred\*(rq which contains exactly those messages that were selected.
264 will zero the sequence before adding it. This
265 action can be disabled with the
267 switch, which means that the
270 will be added to the sequence, if it
271 already exists, and any messages already a part of that sequence will
288 .ta \w'%etcdir%/ExtraBigFileName 'u
289 ^$HOME/\&.mh\(ruprofile~^The user profile
292 .SH "PROFILE COMPONENTS"
296 .ta \w'ExtraBigProfileName 'u
297 ^Path:~^To determine the user's nmh directory
298 ^Current\-Folder:~^To find the default current folder
306 .RB ` +folder "' defaults to the current folder"
307 .RB ` msgs "' defaults to all"
308 .RB ` "\-datefield date" '
310 .RB ` \-list "' is the default if no `\-sequence', `\-nolist' otherwise"
314 If a folder is given, it will become the current folder.
317 In previous versions of
326 the selected messages. This was rather
327 \*(lqinverted logic\*(rq from the UNIX point of view, so
329 was changed to define sequences and output those sequences. Hence,
331 can be used to generate the arguments for all other
333 commands, instead of giving
335 endless switches for invoking those commands
338 Also, previous versions of
340 balked if you didn't specify
341 a search string or a date/time constraint. The current version does
342 not, and merely matches the messages you specify. This lets you type
346 show\0`pick\0last:20\0\-seq\0fear`
353 mark\0\-add\0\-nozero\0\-seq\0fear\0last:20
358 Finally, timezones used to be ignored when comparing dates: they aren't
363 .RB \*(lq "pick sequence \-list" \*(rq
364 to enumerate the messages in a sequence
365 (such as for use by a shell script).
372 switches must be interpreted
373 as a single token by the shell that invokes
376 must usually place the argument to this switch inside quotes.
377 Furthermore, any occurrence of
379 must occur prior to the
383 switch it applies to.
387 is used in a back\-quoted operation, such as
390 scan\0`pick\0\-from\0jones`
395 selects no messages (e.g., no messages are from
396 \*(lqjones\*(rq), then the shell will still run the outer command (e.g.,
398 Since no messages were matched,
401 no output, and the argument given to the outer command as a result of
404 is empty. In the case of
407 the outer command now acts as if the default `msg' or `msgs' should be
408 used (e.g., \*(lqall\*(rq in the case of
411 unexpected behavior, if
413 was given, and if its standard output is not a tty, then
415 outputs the illegal message number \*(lq0\*(rq
416 when it fails. This lets the outer command fail gracefully as well.
418 The pattern syntax \*(lq[l-r]\*(rq is not supported; each letter to be
419 matched must be included within the square brackets.