about summary refs log tree commit diff
path: root/mless
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-07-26 13:44:07 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-07-26 13:44:07 +0200
commita8210013684a18e59bc0f8563c417d2eea409e7c (patch)
treee60c5e64e9b3e80976ce97b7285f30f39175d15f /mless
parentc618ba7556ad163ccb6544cc55168dce8d9a2aa8 (diff)
downloadmblaze-a8210013684a18e59bc0f8563c417d2eea409e7c.tar.gz
mblaze-a8210013684a18e59bc0f8563c417d2eea409e7c.tar.xz
mblaze-a8210013684a18e59bc0f8563c417d2eea409e7c.zip
mless: fix adding //scan view
Diffstat (limited to 'mless')
-rwxr-xr-xmless6
1 files changed, 4 insertions, 2 deletions
diff --git a/mless b/mless
index 6111a60..e35275f 100755
--- a/mless
+++ b/mless
@@ -48,9 +48,11 @@ if [ "$1" = --filter ]; then
 	exit $?
 fi
 
+scantab=
 if [ "$#" -eq 0 ] && ! [ -t 0 ]; then
 	msetseq >/dev/null
-	set -- //scan :
+	set -- :
+	scantab=//scan
 fi
 
 if ! [ -t 1 ]; then
@@ -65,4 +67,4 @@ esac
 curcmd=$(mnums "$@" |
 	awk -v cur=$(mseq -n .) -v d=$d '$1 == cur {print "+" FNR+d ":x"; quit}')
 
-LESSOPEN="|$0 --filter %s" exec less -Ps"mless %f?m (message %i of %m).." -R $curcmd $(mnums "$@")
+LESSOPEN="|$0 --filter %s" exec less -Ps"mless %f?m (message %i of %m).." -R $curcmd $scantab $(mnums "$@")