VERSION: 2.6.1
OS: Windows 11
Adding this line isn't updating the usage line to display USAGE: app_name.exe [OPTIONS] when I run my application with --help:
app.get_formatter()->label("Usage", "USAGE:");
It continues to just output the app name like this: app_name [OPTIONS]. However, doing this works:
class UsageFormatter final : public CLI::Formatter
{
public:
std::string make_usage(const CLI::App* app, const std::string name) const override
{
return "USAGE: " + name + (app->get_help_ptr() != nullptr ? " [OPTIONS]" : "") + "\n";
}
};
CLI::App app{};
app.formatter(std::make_shared<UsageFormatter>());
Is this a bug/am I doing something wrong? Or was this functionality removed?