about summary refs log tree commit diff
path: root/unscoop.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-05-02 19:58:28 -0400
committerJune McEnroe <june@causal.agency>2021-05-02 19:58:28 -0400
commit90fbb368596a36da1b1b1f27a55570926c71c650 (patch)
treeeee92c1db881182cd619d5d11332beef6431a6ef /unscoop.c
parentDefault to MANDIR=${PREFIX}/man, support BINDIR (diff)
downloadlitterbox-90fbb368596a36da1b1b1f27a55570926c71c650.tar.gz
litterbox-90fbb368596a36da1b1b1f27a55570926c71c650.zip
Get list of formats to test from unscoop itself
Diffstat (limited to '')
-rw-r--r--unscoop.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/unscoop.c b/unscoop.c
index 153841c..0ae16d9 100644
--- a/unscoop.c
+++ b/unscoop.c
@@ -221,9 +221,12 @@ static const struct Format {
 };
 
 static const struct Format *formatParse(const char *name) {
+	bool list = !strcmp(name, "?");
 	for (size_t i = 0; i < ARRAY_LEN(Formats); ++i) {
 		if (!strcmp(name, Formats[i].name)) return &Formats[i];
+		if (list) printf("%s\n", Formats[i].name);
 	}
+	if (list) exit(EX_OK);
 	errx(EX_USAGE, "no such format %s", name);
 }
 
title='2021-02-07 17:35:57 -0500'>2021-02-07Set urgency on bell in xtermJune McEnroe 2021-02-07Add bindings for brightness controlJune McEnroe 2021-02-07Set X key repeat rateJune McEnroe 2021-02-07Bump font size to 12June McEnroe 2021-02-07Fully configure and rebind cwmJune McEnroe 2021-02-07Add BintiJune McEnroe 2021-02-07Finish configuring xtermJune McEnroe 2021-02-06Enable tapping, reverse scroll, set scaling in wsconsctlJune McEnroe 2021-02-06Set root window to black on purple snowJune McEnroe 2021-02-06Add xmodmap configurationJune McEnroe 2021-02-06Add initial OpenBSD X configurationJune McEnroe 2021-02-06Add xterm output to schemeJune McEnroe