about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--man/mless.18
-rwxr-xr-xmless8
-rw-r--r--mlesskey.example2
3 files changed, 16 insertions, 2 deletions
diff --git a/man/mless.1 b/man/mless.1
index a085946..d446fdd 100644
--- a/man/mless.1
+++ b/man/mless.1
@@ -43,6 +43,14 @@ Use
 and
 .Sq Ic ":p"
 to read the next (resp. previous) message.
+.Sh FILES
+.Bl -tag -width Ds
+.It Pa ${MBLAZE:-$HOME/.mblaze}/mlesskey , Pa $HOME/.mlesskey
+Additional keybindings loaded for convenience.
+.It Pa ${MBLAZE:-$HOME/.mblaze}/mless , Pa $HOME/.mless
+Additional compiled keybindings loaded for convenience.
+(Only needed for less earlier than version 590.)
+.El
 .Sh EXIT STATUS
 .Ex -std
 .Sh SEE ALSO
diff --git a/mless b/mless
index 08ce513..ddead98 100755
--- a/mless
+++ b/mless
@@ -72,7 +72,13 @@ nl="
 "
 export MLESS_RAW=0
 export MLESS_HTML=0
-if [ -f "$MBLAZE/mless" ]; then
+if [ -f "$MBLAZE/mlesskey" ]; then
+	export LESSKEYIN="$MBLAZE/mlesskey"
+elif [ -f "$HOME/.mblaze/mlesskey" ]; then
+	export LESSKEYIN="$HOME/.mblaze/mlesskey"
+elif [ -f "$HOME/.mlesskey" ]; then
+	export LESSKEYIN="$HOME/.mlesskey"
+elif [ -f "$MBLAZE/mless" ]; then
 	export LESSKEY="$MBLAZE/mless"
 elif [ -f "$HOME/.mblaze/mless" ]; then
 	export LESSKEY="$HOME/.mblaze/mless"
diff --git a/mlesskey.example b/mlesskey.example
index 59e2097..6692b53 100644
--- a/mlesskey.example
+++ b/mlesskey.example
@@ -1,5 +1,5 @@
 # mless(1) keybindings
-# to update: lesskey -o ~/.mless ~/.mlesskey
+# to update (only on less <590): lesskey -o ~/.mless ~/.mlesskey
 Q quit \1
 :cq quit \1
 [ prev-file