aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-07-28 13:57:18 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-07-28 13:57:18 +0200
commitdc43475d7641ad4d410279a9d80ec2b5a838c8ce (patch)
treea521509a764f6bccb36c17bace501138da445f27
parentddf275fa83238242a3f84736197d8fc8e56eeded (diff)
downloadmblaze-dc43475d7641ad4d410279a9d80ec2b5a838c8ce.tar.gz
mless: tone down footers and pgp armor
-rwxr-xr-xmless8
1 files changed, 7 insertions, 1 deletions
diff --git a/mless b/mless
index c4bdc53..2feaf03 100755
--- a/mless
+++ b/mless
@@ -9,9 +9,15 @@ function fg(c, s) { return sprintf("\033[38;5;%03dm%s\033[0m", c, s) }
function so(s) { return sprintf("\033[1m%s\033[0m", s) }
BEGIN { hdr = 1 }
/^$/ { hdr = 0 }
+/^-- $/ { ftr = 1 }
+/^--- .* ---/ { print fg(242, $0); ftr = 0; sig = 0; next }
+/^-----BEGIN .* SIGNATURE-----/ { sig = 1 }
hdr && /^From:/ { print so(fg(119, $0)); next }
hdr { print fg(120, $0); next }
-/^--- .* ---/ { print fg(242, $0); next }
+ftr { print fg(244, $0); next }
+/^-----BEGIN .* MESSAGE-----/ ||
+/^-----END .* SIGNATURE-----/ { print fg(244, $0); sig = 0; next }
+sig { print fg(244, $0); next }
/^>/ { print fg(151, $0); next }
{ print }'
}