shithub: front

Download patch

ref: aeb857e367df5f414707fe054edc487386adbe54
parent: 15ceba4fc9de64333f25cca8d519962526be9cb1
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);
--