summary refs log tree commit diff
path: root/bin/ever.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ever.c')
-rw-r--r--bin/ever.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/ever.c b/bin/ever.c
index 258b058b..f8ff943b 100644
--- a/bin/ever.c
+++ b/bin/ever.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2017  C. McEnroe <june@causal.agency>
+/* Copyright (C) 2017  June McEnroe <june@causal.agency>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as published by
@@ -45,6 +45,7 @@ static int watch(int kq, char *path) {
 	return fd;
 }
 
+static bool quiet;
 static void exec(int fd, char *const argv[]) {
 	pid_t pid = fork();
 	if (pid < 0) err(EX_OSERR, "fork");
@@ -59,6 +60,7 @@ static void exec(int fd, char *const argv[]) {
 	pid = wait(&status);
 	if (pid < 0) err(EX_OSERR, "wait");
 
+	if (quiet) return;
 	if (WIFEXITED(status)) {
 		warnx("exit %d\n", WEXITSTATUS(status));
 	} else if (WIFSIGNALED(status)) {
@@ -71,9 +73,10 @@ static void exec(int fd, char *const argv[]) {
 int main(int argc, char *argv[]) {
 	bool input = false;
 
-	for (int opt; 0 < (opt = getopt(argc, argv, "i"));) {
+	for (int opt; 0 < (opt = getopt(argc, argv, "iq"));) {
 		switch (opt) {
 			break; case 'i': input = true;
+			break; case 'q': quiet = true;
 			break; default:  return EX_USAGE;
 		}
 	}
td>2021-01-20Avoid matching ':' in make tagsJune McEnroe Otherwise a :: rule includes one of the ':'s in the tag name. 2021-01-19Prefer tag matches not preceded by [[:alnum:]]June McEnroe Otherwise the "id" in "void" matches for "void id". 2021-01-19Escape \ and / in mtags search patternsJune McEnroe 2021-01-20Use mtags in source-filterJune McEnroe 2021-01-19Add mtags to generate tags for make and mdocJune McEnroe 2021-01-19Map tags to IDs using only [[:alnum:]-._]June McEnroe 2021-01-19Don't use a pager if reading standard inputJune McEnroe 2021-01-19Support BSD make syntax and match *.amJune McEnroe These don't really go together, but... 2021-01-19Match tab following escaped newline in make assignmentsJune McEnroe Otherwise it ends up going into Shell state. 2021-01-18Allow matching lexers using first input lineJune McEnroe