about summary refs log tree commit diff
path: root/mless
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-07-20 14:07:20 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-07-20 14:10:47 +0200
commitdc4670141859e03d860ea968d7827498581eb867 (patch)
treedf0f2d8bc12bdfea398dfea49ab59ecfcd236e51 /mless
parent06c46304b43318a6047e31dbd9c8fa15f6906571 (diff)
downloadmblaze-dc4670141859e03d860ea968d7827498581eb867.tar.gz
mblaze-dc4670141859e03d860ea968d7827498581eb867.tar.xz
mblaze-dc4670141859e03d860ea968d7827498581eb867.zip
mless: use mshow
Diffstat (limited to 'mless')
-rwxr-xr-xmless8
1 files changed, 4 insertions, 4 deletions
diff --git a/mless b/mless
index 4e22f69..d703a6b 100755
--- a/mless
+++ b/mless
@@ -1,10 +1,10 @@
 #!/bin/sh
-# mless RANGES... - less(1)-wrapper around show
+# mless RANGES... - less(1)-wrapper around mshow
 
 PATH="${0%/*}:$PATH"
 
 if [ "$1" = --filter ]; then
-	show "$2" | awk '
+	mshow "$2" | awk '
 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 }
@@ -17,7 +17,7 @@ hdr { print fg(120, $0); next }
 	exit $?
 fi
 
-cur=$(mseq -n .)
-curcmd=$(mseq -n "$@" | awk -v cur=$cur '$1 == cur {print "+" FNR ":x"; quit}')
+curcmd=$(mseq -n "$@" |
+	awk -v cur=$(mseq -n .) '$1 == cur {print "+" FNR ":x"; quit}')
 
 LESSOPEN="|$0 --filter %s" exec less -R $curcmd $(mseq -n "$@")