diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2016-07-20 14:48:02 +0200 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2016-07-20 14:48:02 +0200 |
commit | 785283bd31a8499be4e4f4fe4186d1dc8aae913d (patch) | |
tree | 2ed69fa17a62fc734a0e78cb951c139cc3a6334b /mless | |
parent | cfb0d7986d284f1e8d14326a8ee43c7cab8e70fc (diff) | |
download | mblaze-785283bd31a8499be4e4f4fe4186d1dc8aae913d.tar.gz mblaze-785283bd31a8499be4e4f4fe4186d1dc8aae913d.tar.xz mblaze-785283bd31a8499be4e4f4fe4186d1dc8aae913d.zip |
mless: call msetseq when we get stuff on stdin w/o arguments
Diffstat (limited to 'mless')
-rwxr-xr-x | mless | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mless b/mless index 0f02078..a4dfdef 100755 --- a/mless +++ b/mless @@ -17,6 +17,11 @@ hdr { print fg(120, $0); next } exit $? fi +if [ "$#" -eq 0 ] && ! [ -t 0 ]; then + msetseq >/dev/null + set -- : +fi + curcmd=$(mseq -n "$@" | awk -v cur=$(mseq -n .) '$1 == cur {print "+" FNR ":x"; quit}') |