Changes to magrep.1

- Try not to use 'messages msgs'
- 'matches' instead of 'instead match'
- 'specified' instead of 'passed'
- Clarify default use of current sequence
- Simplify some language used
- List '-p' output in the order it is printed
- Remove superfluous 'the'
- Bring EXIT STATUS in line with '.Ex -std'
pull/42/head
Larry Hynes 7 years ago
parent 613a1182ff
commit b0a7d4da82

@ -14,9 +14,9 @@
.Op Ar msgs\ ... .Op Ar msgs\ ...
.Sh DESCRIPTION .Sh DESCRIPTION
.Nm .Nm
prints the messages prints the names of files from the specified
.Ar msgs .Ar msgs
where the value of if the value of
.Ar header .Ar header
matches the POSIX Extended Regular Expression matches the POSIX Extended Regular Expression
.Ar regex . .Ar regex .
@ -25,42 +25,42 @@ If
.Ar header .Ar header
is empty, is empty,
.Nm .Nm
will instead match against the Maildir flags of the messages. matches against the Maildir flags of
.Ar msgs .
.Pp .Pp
If If
.Ar header .Ar header
is is
.Sq Cm \&/ , .Sq Cm \&/ ,
.Nm .Nm
will instead search the plain text parts of the searches any plain text parts of the
.Em body .Ar msgs
of the messages. .Em body .
.Pp .Pp
See See
.Xr mmsg 7 .Xr mmsg 7
for the message argument syntax. for the message argument syntax.
If no If no
.Ar msgs .Ar msgs
are passed, and are specified, and
.Nm .Nm
is used interactively, is used interactively,
.Nm the current sequence will be searched.
will default to the current sequence.
.Pp .Pp
The options are as follows: The options are as follows:
.Bl -tag -width Ds .Bl -tag -width Ds
.It Fl a .It Fl a
Search for Search for
.Ar regex .Ar regex
only in all RFC 2822 address parts in in RFC 2822 address
.Ar header . .Ar header
parts only.
.It Fl c .It Fl c
Don't print matching messages, Only print a count of matching messages.
just display the number of matched messages.
.It Fl d .It Fl d
Decode the Decode the
.Ar header .Ar header
according to RFC 2047 first. according to RFC 2047 prior to searching.
.It Fl i .It Fl i
Match Match
.Ar regex .Ar regex
@ -70,7 +70,7 @@ Do not show more than
.Ar max .Ar max
matches. matches.
.It Fl o .It Fl o
Print each match, Print each match only,
not the entire line. not the entire line.
This option is ignored if This option is ignored if
.Fl c , .Fl c ,
@ -79,14 +79,15 @@ or
.Fl v .Fl v
is specified. is specified.
.It Fl p .It Fl p
Print matching messages Print the file name,
.Ar msgs , the header and the matching line
the matching line and the header. for each of the matched
.Ar msgs .
If If
.Fl o .Fl o
is specified each match is printed, is specified each match is printed,
instead of the matching line. instead of the matching line.
This option is ignored if the This option is ignored if
.Fl c , .Fl c ,
.Fl q .Fl q
or or
@ -96,15 +97,14 @@ is specified.
Quiet mode: do not print anything, Quiet mode: do not print anything,
quit as soon as possible. quit as soon as possible.
.It Fl v .It Fl v
Invert the match, print (or count) all messages where Invert the match; print (or count) all files where
.Ar regex .Ar regex
does not match. does not match.
.El .El
.Sh EXIT STATUS .Sh EXIT STATUS
.Nm .Nm
returns with exit status 0 if a match was found, exits 0 on success, 1 if no match was found
with exit status 1 if no match was found, and >1 if an error occurs.
and with exit status higher than 1 if an error occurred.
.Sh SEE ALSO .Sh SEE ALSO
.Xr grep 1 , .Xr grep 1 ,
.Xr mmsg 7 , .Xr mmsg 7 ,

Loading…
Cancel
Save