From 803665b9b2fbd4b131758ebefcb1eb77aa46d00b Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Thu, 28 Jul 2016 23:46:02 +0200 Subject: mless: experimental shortcuts Compile mlesskey.example into ~/.mless to use them. --- mless | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'mless') diff --git a/mless b/mless index 03f41a1..db0a728 100755 --- a/mless +++ b/mless @@ -71,5 +71,21 @@ fi nl=" " -LESSOPEN="|$0 --filter %s" exec less -Ps"mless %f?m (message %i of %m).." -R \ - "+:e $(mseq -n .)$nl" //scan $(mseq -n :) +while :; do + [ -f $HOME/.mless ] && export LESSKEY=$HOME/.mless + LESSOPEN="|$0 --filter %s" \ + less -Ps"mless %f?m (message %i of %m).." -R \ + "+:e $(mseq -n .)$nl" //scan $(mseq -n :) + case "$?" in + 0|1) exit $?;; + 78) # N go to next unsen message + mseq -C "$(mseq -r .: | + awk -F':2,' '$1 !~ /^