diff options
Diffstat (limited to 'libtests')
-rw-r--r-- | libtests/arg_parser.cc | 2 | ||||
-rw-r--r-- | libtests/qtest/arg_parser/completion-top-arg-zsh.out | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/libtests/arg_parser.cc b/libtests/arg_parser.cc index a57b9c66..3da0206e 100644 --- a/libtests/arg_parser.cc +++ b/libtests/arg_parser.cc @@ -51,7 +51,7 @@ ArgParser::initOptions() ap.addRequiredParameter("salad", p(&ArgParser::handleSalad), "tossed"); ap.addOptionalParameter("moo", p(&ArgParser::handleMoo)); char const* choices[] = {"pig", "boar", "sow", 0}; - ap.addRequiredChoices("oink", p(&ArgParser::handleOink), choices); + ap.addChoices("oink", p(&ArgParser::handleOink), true, choices); ap.selectHelpOptionTable(); ap.addBare("version", [this](){ output("3.14159"); }); ap.selectMainOptionTable(); diff --git a/libtests/qtest/arg_parser/completion-top-arg-zsh.out b/libtests/qtest/arg_parser/completion-top-arg-zsh.out index 11bcb3b6..5a500d38 100644 --- a/libtests/qtest/arg_parser/completion-top-arg-zsh.out +++ b/libtests/qtest/arg_parser/completion-top-arg-zsh.out @@ -1,5 +1,8 @@ --baaa --completion-zsh +--help +--help= +--help=all --moo --moo= --oink= |