diff options
author | Leah Neukirchen <leah@vuxu.org> | 2017-09-01 17:34:36 +0200 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2017-09-01 17:34:36 +0200 |
commit | 3bfd9319e9e7385f97d5a32e36bb53890731b110 (patch) | |
tree | 6e411189c310c150e319a505f31e05894be0d9ae | |
parent | 66d0eff12fdf31e520493e7c2accb95410dcaec2 (diff) | |
download | mblaze-3bfd9319e9e7385f97d5a32e36bb53890731b110.tar.gz mblaze-3bfd9319e9e7385f97d5a32e36bb53890731b110.tar.xz mblaze-3bfd9319e9e7385f97d5a32e36bb53890731b110.zip |
mflag: fix behavior with no arguments and reading from not a tty
-rw-r--r-- | mflag.c | 5 |
1 files changed, 5 insertions, 0 deletions
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); |