From 3bfd9319e9e7385f97d5a32e36bb53890731b110 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Fri, 1 Sep 2017 17:34:36 +0200 Subject: mflag: fix behavior with no arguments and reading from not a tty --- mflag.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mflag.c') diff --git a/mflag.c b/mflag.c index 687ea6e..a5a6005 100644 --- a/mflag.c +++ b/mflag.c @@ -138,6 +138,11 @@ main(int argc, char *argv[]) curfile = blaze822_seq_cur(); if (vflag) { + if (argc == optind && !isatty(0)) { + blaze822_loop(0, 0, flag); // read from stdin + return 0; + } + args = calloc(sizeof (char *), argsalloc); if (!args) exit(-1); -- cgit 1.4.1