From 4b8ad4934cbffe4579fe9e3bde25c3e2da4a9cfd Mon Sep 17 00:00:00 2001 From: katherine Date: Wed, 11 Dec 2019 13:40:08 -0700 Subject: add command descriptions to --help --- src/opt.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/opt.c') diff --git a/src/opt.c b/src/opt.c index b7538db..eebb248 100644 --- a/src/opt.c +++ b/src/opt.c @@ -16,7 +16,7 @@ static struct simple_opt options[] = { { SIMPLE_OPT_STRING, 'c', "calendar", true, "path to calendar", "" }, { SIMPLE_OPT_STRING, 'e', "editor", true, - "text editor for editing calendars", "" }, + "text editor for editing calendars", "" }, { SIMPLE_OPT_END } }; @@ -38,6 +38,15 @@ void opt_parse(int argc, char **argv) "[-c CALENDAR_FILE] [-m OUTPUT_MODE]", "every is a flexible, console-based event calendar", options); + + printf( + "\n" + "Commands\n" + " c (default) print upcoming events in interactive console mode\n" + " s print upcoming events in a format appropriate for scripting\n" + " e open calendar with text editor\n" + ); + exit(EXIT_SUCCESS); } -- cgit v1.2.3