mshow: add -F to disable MIME filters

pull/75/head
Leah Neukirchen 7 years ago
parent 75ba2ab9a5
commit f1789cfcef

@ -8,7 +8,7 @@
.Nm .Nm
.Op Fl h Ar headers .Op Fl h Ar headers
.Op Fl A Ar mimetypes .Op Fl A Ar mimetypes
.Op Fl nqrHLN .Op Fl nqrFHLN
.Op Ar msgs\ ... .Op Ar msgs\ ...
.Nm .Nm
.Fl x Ar msg .Fl x Ar msg
@ -62,6 +62,8 @@ Don't render the body, stop after header output.
.It Fl r .It Fl r
Don't render the body, print raw body. Don't render the body, print raw body.
This may be dangerous to use on a tty. This may be dangerous to use on a tty.
.It Fl F
Don't apply filters to MIME parts.
.It Fl H .It Fl H
Don't decode the headers, print all raw headers. Don't decode the headers, print all raw headers.
This may be dangerous to use on a tty. This may be dangerous to use on a tty.

@ -18,6 +18,7 @@
static int rflag; static int rflag;
static int Rflag; static int Rflag;
static int qflag; static int qflag;
static int Fflag;
static int Hflag; static int Hflag;
static int Lflag; static int Lflag;
static int Nflag; static int Nflag;
@ -727,12 +728,13 @@ main(int argc, char *argv[])
pid_t pid1 = -1, pid2 = -1; pid_t pid1 = -1, pid2 = -1;
int c; int c;
while ((c = getopt(argc, argv, "h:A:qrtHLNx:O:Rn")) != -1) while ((c = getopt(argc, argv, "h:A:qrtFHLNx:O:Rn")) != -1)
switch (c) { switch (c) {
case 'h': hflag = optarg; break; case 'h': hflag = optarg; break;
case 'A': Aflag = optarg; break; case 'A': Aflag = optarg; break;
case 'q': qflag = 1; break; case 'q': qflag = 1; break;
case 'r': rflag = 1; break; case 'r': rflag = 1; break;
case 'F': Fflag = 1; break;
case 'H': Hflag = 1; break; case 'H': Hflag = 1; break;
case 'L': Lflag = 1; break; case 'L': Lflag = 1; break;
case 'N': Nflag = 1; break; case 'N': Nflag = 1; break;
@ -743,7 +745,7 @@ main(int argc, char *argv[])
case 'n': nflag = 1; break; case 'n': nflag = 1; break;
default: default:
fprintf(stderr, fprintf(stderr,
"Usage: mshow [-h headers] [-A mimetypes] [-nqrHLN] [msgs...]\n" "Usage: mshow [-h headers] [-A mimetypes] [-nqrFHLN] [msgs...]\n"
" mshow -x msg parts...\n" " mshow -x msg parts...\n"
" mshow -O msg parts...\n" " mshow -O msg parts...\n"
" mshow -t msgs...\n" " mshow -t msgs...\n"
@ -788,7 +790,7 @@ main(int argc, char *argv[])
} else if (Rflag) { // render for reply } else if (Rflag) { // render for reply
blaze822_loop(argc-optind, argv+optind, reply); blaze822_loop(argc-optind, argv+optind, reply);
} else { // show } else { // show
if (!(qflag || rflag)) { if (!(qflag || rflag || Fflag)) {
char *f = getenv("MAILFILTER"); char *f = getenv("MAILFILTER");
if (!f) if (!f)
f = blaze822_home_file("filter"); f = blaze822_home_file("filter");

Loading…
Cancel
Save