mblaze

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

commit 85cbd9976b1104ce0f23d39385197548117734f2
parent 08f5a8e1ddc2e4699f0e3aa4704fc37f1577ed9d
Author: Christian Neukirchen <chneukirchen@gmail.com>
Date:   Fri, 29 Jul 2016 17:12:37 +0200

mless: H to toggle HTML rendering

Diffstat:
mless | 11++++++++++-
mlesskey.example | 1+
2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/mless b/mless @@ -47,7 +47,11 @@ if [ "$1" = --filter ]; then fi if [ $MLESS_RAW -eq 0 ]; then - mshow "$2" | colormsg + if [ $MLESS_HTML -eq 1 ]; then + mshow -A text/html "$2" + else + mshow "$2" + fi | colormsg else mseq -r $2 echo @@ -78,6 +82,7 @@ fi nl=" " export MLESS_RAW=0 +export MLESS_HTML=0 while :; do [ -f $HOME/.mless ] && export LESSKEY=$HOME/.mless LESSOPEN="|$0 --filter %s" \ @@ -97,5 +102,9 @@ while :; do ;; 82) # R toggle raw mode MLESS_RAW=$((1-$MLESS_RAW)) + ;; + 72) # H toggle HTML mode + MLESS_HTML=$((1-$MLESS_HTML)) + ;; esac done diff --git a/mlesskey.example b/mlesskey.example @@ -6,6 +6,7 @@ Q quit \1 ] next-file S noaction E//scan\n ` noaction E\#\n +H quit H N quit N R quit R k quit k