diff --git a/client/command.c b/client/command.c index 707f7f5b..6cc0b8e0 100644 --- a/client/command.c +++ b/client/command.c @@ -624,6 +624,7 @@ static const struct option command_opts[] = { { COMMAND_OPTION_USERNAME, required_argument, NULL, 'u' }, { COMMAND_OPTION_PASSWORD, required_argument, NULL, 'p' }, { COMMAND_OPTION_PASSPHRASE, required_argument, NULL, 'P' }, + { COMMAND_OPTION_DONTASK, no_argument, NULL, 'd' }, { } }; @@ -648,7 +649,7 @@ bool command_init(char **argv, int argc) for (;;) { struct command_option *option; - opt = getopt_long(argc, argv, "u:p:P:", command_opts, NULL); + opt = getopt_long(argc, argv, "u:p:P:d", command_opts, NULL); switch (opt) { case 'u': @@ -674,6 +675,13 @@ bool command_init(char **argv, int argc) l_queue_push_tail(command_options, option); + break; + case 'd': + option = l_new(struct command_option, 1); + option->name = COMMAND_OPTION_DONTASK; + + l_queue_push_tail(command_options, option); + break; case -1: goto options_parsed; diff --git a/client/command.h b/client/command.h index 4b2f4de3..ab1644c1 100644 --- a/client/command.h +++ b/client/command.h @@ -23,6 +23,7 @@ #define COMMAND_OPTION_USERNAME "username" #define COMMAND_OPTION_PASSWORD "password" #define COMMAND_OPTION_PASSPHRASE "passphrase" +#define COMMAND_OPTION_DONTASK "dontask" typedef char *(*command_completion_func_t) (const char *text, int state);