git: 9front

Download patch

ref: 8ddde2cf466ddc6d8bd82d1ee5c0a93e5d0eb1ae
parent: b46825121dc35c7a38f42bbc426bce51b3cff397
author: Ori Bernstein <ori@eigenstate.org>
date: Thu Nov 7 15:51:09 EST 2024

acme/Mail: provide runnable command to view html

--- a/sys/src/cmd/upas/Mail/mesg.c
+++ b/sys/src/cmd/upas/Mail/mesg.c
@@ -289,7 +289,10 @@
 			name = "body";
 		if((suff = strchr(name, '.')) == nil)
 			suff = "";
-		Bprint(wfd, "\tcp %s%sbody%s %s/%s\n", mbox.path, a->name, suff, home, name);
+		if(strcmp(a->type, "text/html") == 0)
+			Bprint(wfd, "\thtmlfmt -a %s%sbody.html\n", mbox.path, a->name);
+		else
+			Bprint(wfd, "\tcp %s%sbody%s %s/%s\n", mbox.path, a->name, suff, home, name);
 		continue;
 	}
 	Bterm(wfd);
--