diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2016-07-20 15:11:27 +0200 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2016-07-20 15:11:27 +0200 |
commit | cef55b231df966eba550f908085989a90742e844 (patch) | |
tree | 37b423560f98382d09b9d83e1f2b3be8b533e428 /mless | |
parent | 2c2be8bd3725787b38835576efd22a1bb78c743b (diff) | |
download | mblaze-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-x | mless | 4 |
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}') |