about summary refs log tree commit diff
path: root/mless
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-07-20 15:11:27 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-07-20 15:11:27 +0200
commitcef55b231df966eba550f908085989a90742e844 (patch)
tree37b423560f98382d09b9d83e1f2b3be8b533e428 /mless
parent2c2be8bd3725787b38835576efd22a1bb78c743b (diff)
downloadmblaze-cef55b231df966eba550f908085989a90742e844.tar.gz
mblaze-cef55b231df966eba550f908085989a90742e844.tar.xz
mblaze-cef55b231df966eba550f908085989a90742e844.zip
mless: when output is not a tty, just call mseq
Diffstat (limited to 'mless')
-rwxr-xr-xmless4
1 files changed, 4 insertions, 0 deletions
diff --git a/mless b/mless
index a4dfdef..0643460 100755
--- a/mless
+++ b/mless
@@ -22,6 +22,10 @@ if [ "$#" -eq 0 ] && ! [ -t 0 ]; then
 	set -- :
 fi
 
+if ! [ -t 1 ]; then
+	exec mseq "$@"
+fi
+
 curcmd=$(mseq -n "$@" |
 	awk -v cur=$(mseq -n .) '$1 == cur {print "+" FNR ":x"; quit}')