mblaze

Unix utilities to deal with Maildir - my mirror
git clone https://pi.duncano.de/git/mblaze.git
Log | Files | Refs | README | COPYING

commit dc43475d7641ad4d410279a9d80ec2b5a838c8ce
parent ddf275fa83238242a3f84736197d8fc8e56eeded
Author: Christian Neukirchen <chneukirchen@gmail.com>
Date:   Thu, 28 Jul 2016 13:57:18 +0200

mless: tone down footers and pgp armor

Diffstat:
mless | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git 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 }' }