aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkatherine <ageha@airen-no-jikken.icu>2019-12-11 13:40:08 -0700
committerkatherine <ageha@airen-no-jikken.icu>2019-12-11 13:40:08 -0700
commit4b8ad4934cbffe4579fe9e3bde25c3e2da4a9cfd (patch)
tree2e294790d9be6c76eb15e9c83cf84003c4301d18
parentd4b55b23425b2098b4e74a9cf90d2d92dc470736 (diff)
downloadevery-4b8ad4934cbffe4579fe9e3bde25c3e2da4a9cfd.tar.gz
add command descriptions to --help
-rw-r--r--src/opt.c11
1 files changed, 10 insertions, 1 deletions
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", "<file>" },
{ SIMPLE_OPT_STRING, 'e', "editor", true,
- "text editor for editing calendars", "<file>" },
+ "text editor for editing calendars", "<cmd>" },
{ 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);
}