Closed
Description
In the config:
#include <lyra/lyra.hpp>
#include <string>
int main(int argc, const char *argv[]) {
std::string named_required;
std::string optional;
auto cli = lyra::opt(named_required,
"required-arg")["--required"]("You must supply this arg")
.required() |
lyra::arg(optional, "optional")("This is an optional arg");
std::cout << cli << "\n";
}
The output is:
USAGE:
<executable> --required [<optional>]
OPTIONS, ARGUMENTS:
--required <required-arg>
You must supply this arg
<optional> This is an optional arg
The --required
in the USAGE:
line does not refer to the required parameter name. I'd expect to see:
USAGE:
<executable> --required <required-arg> [<optional>]
OPTIONS, ARGUMENTS:
--required <required-arg>
You must supply this arg
<optional> This is an optional arg