about summary refs log tree commit diff
path: root/mshow.c
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2017-09-22 15:37:36 +0200
committerLeah Neukirchen <leah@vuxu.org>2017-09-22 15:37:36 +0200
commitf1789cfcef342342246af95d355fca8515f92198 (patch)
tree4f30ccfcda5f9a10682e857f76022a6ee2214db9 /mshow.c
parent75ba2ab9a5b3df6c1d3071667094fa050a6d32bb (diff)
downloadmblaze-f1789cfcef342342246af95d355fca8515f92198.tar.gz
mblaze-f1789cfcef342342246af95d355fca8515f92198.tar.xz
mblaze-f1789cfcef342342246af95d355fca8515f92198.zip
mshow: add -F to disable MIME filters
Diffstat (limited to 'mshow.c')
-rw-r--r--mshow.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/mshow.c b/mshow.c
index e37e7fe..eff8c76 100644
--- a/mshow.c
+++ b/mshow.c
@@ -18,6 +18,7 @@
 static int rflag;
 static int Rflag;
 static int qflag;
+static int Fflag;
 static int Hflag;
 static int Lflag;
 static int Nflag;
@@ -727,12 +728,13 @@ main(int argc, char *argv[])
 	pid_t pid1 = -1, pid2 = -1;
 
 	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) {
 		case 'h': hflag = optarg; break;
 		case 'A': Aflag = optarg; break;
 		case 'q': qflag = 1; break;
 		case 'r': rflag = 1; break;
+		case 'F': Fflag = 1; break;
 		case 'H': Hflag = 1; break;
 		case 'L': Lflag = 1; break;
 		case 'N': Nflag = 1; break;
@@ -743,7 +745,7 @@ main(int argc, char *argv[])
 		case 'n': nflag = 1; break;
 		default:
 			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 -O msg parts...\n"
 			    "	    mshow -t msgs...\n"
@@ -788,7 +790,7 @@ main(int argc, char *argv[])
 	} else if (Rflag) { // render for reply
 		blaze822_loop(argc-optind, argv+optind, reply);
 	} else { // show
-		if (!(qflag || rflag)) {
+		if (!(qflag || rflag || Fflag)) {
 			char *f = getenv("MAILFILTER");
 			if (!f)
 				f = blaze822_home_file("filter");