From dc43475d7641ad4d410279a9d80ec2b5a838c8ce Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Thu, 28 Jul 2016 13:57:18 +0200 Subject: mless: tone down footers and pgp armor --- mless | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'mless') 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 }' } -- cgit 1.4.1