about summary refs log tree commit diff
diff options
context:
space:
mode:
-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}')