SCCS-vsn: usr.bin/mail/list.c 5.16
SCCS-vsn: usr.bin/mail/mail.1 6.20
-static char sccsid[] = "@(#)list.c 5.15 (Berkeley) %G%";
+static char sccsid[] = "@(#)list.c 5.16 (Berkeley) %G%";
#endif /* not lint */
#include "rcv.h"
#endif /* not lint */
#include "rcv.h"
* Now look, ignoring case, for the word in the string.
*/
* Now look, ignoring case, for the word in the string.
*/
- cp = str;
- cp2 = hfield("subject", mp);
+ if (value("searchheaders") && (cp = index(str, ':'))) {
+ *cp++ = '\0';
+ cp2 = hfield(str, mp);
+ cp[-1] = ':';
+ str = cp;
+ } else {
+ cp = str;
+ cp2 = hfield("subject", mp);
+ }
if (cp2 == NOSTR)
return(0);
backup = cp2;
if (cp2 == NOSTR)
return(0);
backup = cp2;
.\"
.\" %sccs.include.redist.roff%
.\"
.\"
.\" %sccs.include.redist.roff%
.\"
-.\" @(#)mail.1 6.19 (Berkeley) %G%
+.\" @(#)mail.1 6.20 (Berkeley) %G%
commands.
.It Ar quiet
Suppresses the printing of the version when first invoked.
commands.
.It Ar quiet
Suppresses the printing of the version when first invoked.
+.It Ar searchheaders
+If this option is set, then a message-list specifier in the form ``/x:y''
+will expand to all messages containing the substring ``y'' in the header
+field ``x''. The string search is case insensitive.
.It Ar verbose
Setting the option
.Ar verbose
.It Ar verbose
Setting the option
.Ar verbose