diff options
author | Lukas Fleischer <lfleischer@calcurse.org> | 2016-01-12 18:29:26 +0100 |
---|---|---|
committer | Lukas Fleischer <lfleischer@calcurse.org> | 2016-01-13 17:39:44 +0100 |
commit | c58087d5914322ab8f693729605a9508d67bb676 (patch) | |
tree | 8a1c58b51ca6f05c24c99bfd73a8c41276385f9d /src/args.c | |
parent | 6d9129764bebb775951c2c8629a291407c25a693 (diff) | |
download | calcurse-c58087d5914322ab8f693729605a9508d67bb676.zip |
Add command line option to suppress dialogs
Implement a -q/--quiet command line option to disable system dialogs
temporarily.
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'src/args.c')
-rw-r--r-- | src/args.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -459,7 +459,7 @@ int parse_args(int argc, char **argv) int ch; regex_t reg; - static const char *optstr = "FgGhvnNax::t::d:c:r::s::S:D:i:l:Q"; + static const char *optstr = "FgGhvnNax::t::d:c:r::s::S:D:i:l:qQ"; struct option longopts[] = { {"appointment", no_argument, NULL, 'a'}, @@ -480,6 +480,7 @@ int parse_args(int argc, char **argv) {"todo", optional_argument, NULL, 't'}, {"version", no_argument, NULL, 'v'}, {"export", optional_argument, NULL, 'x'}, + {"quiet", no_argument, NULL, 'q'}, {"query", optional_argument, NULL, 'Q'}, {"filter-type", required_argument, NULL, OPT_FILTER_TYPE}, @@ -602,6 +603,9 @@ int parse_args(int argc, char **argv) optarg); } break; + case 'q': + quiet = 1; + break; case 'Q': query = 1; break; |