From: Paul Fox Date: Sat, 2 Sep 2017 15:24:01 +0000 (-0400) Subject: Add -noprefer switch to mhshow, mhstore, and mhlist X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/ceeb47c04f8abb144a3fbaeae3a54010175c2d36?hp=5dce1b38ace6cf61398df3ee4ca5aee0e1dedb5d Add -noprefer switch to mhshow, mhstore, and mhlist Allow profile-specified -prefer switches to be cancelled from the command line. --- diff --git a/man/mhlist.man b/man/mhlist.man index 89aeeb86..da1ce800 100644 --- a/man/mhlist.man +++ b/man/mhlist.man @@ -23,6 +23,7 @@ mhlist \- list information about nmh MIME messages .RB [ \-prefer .IR content ] \&... +.RB [ \-noprefer ] .RB [ \-headers " | " \-noheaders ] .RB [ \-realsize " | " \-norealsize ] .RB [ \-rcache @@ -184,10 +185,17 @@ invoked with or without various .B \-prefer switches. The +.B \-noprefer +switch will cancel any previous .B \-prefer -switch is functionally most important for -.IR mhshow , -but is also implemented in +switches. +The +.B \-prefer +and +.B \-noprefer +switches are functionally most important for +.BR mhshow , +but are also implemented in .B mhlist and .B mhstore diff --git a/man/mhshow.man b/man/mhshow.man index 922c5bf7..48173e0c 100644 --- a/man/mhshow.man +++ b/man/mhshow.man @@ -23,6 +23,7 @@ mhshow \- display nmh MIME messages .RB [ \-prefer .IR content ] \&... +.RB [ \-noprefer ] .RB [ \-concat " | " \-noconcat ] .RB [ \-textonly " | " \-notextonly ] .RB [ \-inlineonly " | " \-noinlineonly ] @@ -235,6 +236,12 @@ switches. Since the last of multiple options "wins", a .B \-prefer on the command line will override any in a profile entry. +.PP +The +.B \-noprefer +switch will cancel any previous +.B \-prefer +switches. .SS "Unseen Sequence" If the profile entry \*(lqUnseen\-Sequence\*(rq is present and non-empty, then diff --git a/man/mhstore.man b/man/mhstore.man index a5087077..2015a170 100644 --- a/man/mhstore.man +++ b/man/mhstore.man @@ -25,6 +25,7 @@ mhstore \- store contents of nmh MIME messages into files .RB [ \-prefer .IR content ] \&... +.RB [ \-noprefer ] .RB [ \-auto " | " \-noauto ] .RB [ \-clobber .IR always " | " auto " | " suffix " | " ask " | " never ] @@ -168,6 +169,12 @@ and .IR mhshow (1) for more information on .BR \-prefer. +.PP +The +.B \-noprefer +switch will cancel any previous +.B \-prefer +switches. .SS "Checking the Contents" The .B \-check diff --git a/uip/mhlist.c b/uip/mhlist.c index a9be19e1..bc8e2a25 100644 --- a/uip/mhlist.c +++ b/uip/mhlist.c @@ -34,6 +34,7 @@ X("part number", 0, PARTSW) \ X("type content", 0, TYPESW) \ X("prefer content", 0, PREFERSW) \ + X("noprefer", 0, NPREFERSW) \ X("rcache policy", 0, RCACHESW) \ X("wcache policy", 0, WCACHESW) \ X("changecur", 0, CHGSW) \ @@ -174,6 +175,10 @@ do_cache: preferred_subtypes[npreferred++] = cp; continue; + case NPREFERSW: + npreferred = 0; + continue; + case FILESW: if (!(cp = *argp++) || (*cp == '-' && cp[1])) adios (NULL, "missing argument to %s", argp[-2]); diff --git a/uip/mhshow.c b/uip/mhshow.c index 8c604ad8..786c0b6c 100644 --- a/uip/mhshow.c +++ b/uip/mhshow.c @@ -42,6 +42,7 @@ X("part number", 0, PARTSW) \ X("type content", 0, TYPESW) \ X("prefer content", 0, PREFERSW) \ + X("noprefer", 0, NPREFERSW) \ X("rcache policy", 0, RCACHESW) \ X("wcache policy", 0, WCACHESW) \ X("version", 0, VERSIONSW) \ @@ -193,6 +194,10 @@ do_cache: preferred_subtypes[npreferred++] = cp; continue; + case NPREFERSW: + npreferred = 0; + continue; + case FILESW: if (!(cp = *argp++) || (*cp == '-' && cp[1])) adios (NULL, "missing argument to %s", argp[-2]); diff --git a/uip/mhstore.c b/uip/mhstore.c index 2b08a6ba..b8feba96 100644 --- a/uip/mhstore.c +++ b/uip/mhstore.c @@ -31,6 +31,7 @@ X("part number", 0, PARTSW) \ X("type content", 0, TYPESW) \ X("prefer content", 0, PREFERSW) \ + X("noprefer", 0, NPREFERSW) \ X("rcache policy", 0, RCACHESW) \ X("wcache policy", 0, WCACHESW) \ X("version", 0, VERSIONSW) \ @@ -166,6 +167,10 @@ do_cache: preferred_subtypes[npreferred++] = cp; continue; + case NPREFERSW: + npreferred = 0; + continue; + case FILESW: if (!(cp = *argp++) || (*cp == '-' && cp[1])) adios (NULL, "missing argument to %s", argp[-2]);