-
Notifications
You must be signed in to change notification settings - Fork 406
Closed
Description
I recently tried out the new help formatter in 2.5.0 and I am wondering if the following changes are intended or not.
#include "CLI/App.hpp"
#include "CLI/Config.hpp"
#include "CLI/Formatter.hpp"
int main(int argc, char const* argv[])
{
CLI::App app;
bool big_option;
app.add_option("--big", big_option);
auto* group = app.add_option_group("group");
std::string x;
int y;
char z;
group->add_option("a", x);
group->add_option("b", y);
group->add_option("c", z);
CLI11_PARSE(app, argc, argv);
}This leads to some unexpected output now:
$ clitest --help
clitest [OPTIONS]
OPTIONS:
-h, --help Print this help message and exit
--big BOOLEAN
[Option Group: group]
POSITIONALS:
a TEXT
b INT
c CHAR
OPTIONS:
-h, --help Print this help message and exit
Previously the output looked like
Usage: clitest [OPTIONS]
Options:
-h,--help Print this help message and exit
--big BOOLEAN
[Option Group: group]
Positionals:
a TEXT
b INT
c CHAR
The big differences for me are:
- Previously there was no trailing empty newline
- the option groups are not indented anymore
- option groups contain the
--helpflag;
While 2. may be intentional, I would think that at least 1) and 3) are not.
Metadata
Metadata
Assignees
Labels
No labels