about summary refs log tree commit diff
path: root/minc.c
diff options
context:
space:
mode:
Diffstat (limited to 'minc.c')
-rw-r--r--minc.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/minc.c b/minc.c
index c1d28fd..2811646 100644
--- a/minc.c
+++ b/minc.c
@@ -74,14 +74,17 @@ usage:
 			exit(1);
 		}
 
-	if (optind == argc)
-		goto usage;
-
 	xpledge("stdio rpath cpath", "");
 
 	status = 0;
-	for (i = optind; i < argc; i++)
-		inc(argv[i]);
+	if (optind == argc) {
+		if (isatty(0))
+			goto usage;
+		blaze822_loop(0, 0, inc);
+	} else {
+		for (i = optind; i < argc; i++)
+			inc(argv[i]);
+	}
 
 	return status;
 }