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>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user