about summary refs log tree commit diff
path: root/unscoop.c
diff options
context:
space:
mode:
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);
 }