From 5930d91fb676775838d52d7fd9613f0cb52b8ad2 Mon Sep 17 00:00:00 2001 From: Marc Ransome Date: Sat, 28 Sep 2024 23:26:42 +0100 Subject: [PATCH] Show usage when stdin is a tty and no args provided --- src/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 3e63ac5..8378df6 100644 --- a/src/main.c +++ b/src/main.c @@ -22,13 +22,14 @@ #include #include +#include #include "flog.h" #include "common.h" int main(int argc, char *argv[]) { - if (argc == 1 ) { + if (argc == 1 && isatty(fileno(stdin))) { flog_usage(); return 1; }