diff --git a/noice.c b/noice.c index 38604dc..9f4f0cb 100644 --- a/noice.c +++ b/noice.c @@ -878,12 +878,22 @@ moretyping: } } +void +usage(char *argv0) +{ + fprintf(stderr, "usage: %s [dir]\n", argv0); + exit(1); +} + int main(int argc, char *argv[]) { char cwd[PATH_MAX], *ipath; char *ifilter; + if (argc > 2) + usage(argv[0]); + /* Confirm we are in a terminal */ if (!isatty(0) || !isatty(1)) { fprintf(stderr, "stdin or stdout is not a tty\n");