From cef55b231df966eba550f908085989a90742e844 Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Wed, 20 Jul 2016 15:11:27 +0200 Subject: mless: when output is not a tty, just call mseq --- mless | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mless') 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}') -- cgit 1.4.1