Skip to content

Option to hide the default value in the help text #857

@LostInCompilation

Description

@LostInCompilation

When I set a flag like this:

app.add_flag("--hidden,!--no-hidden", showHiddenFiles, "Show or hide hidden files");

the resulting help text looks like this:

--hidden, --no-hidden{false}          Show or hide hidden files

It would be nice to have the ability to hide the {false} part. I did not find such an option in the docs/code. Also using a custom formatter doesn't seem to help, since this behaviour is defined in std::string Option::get_name(bool positional, bool all_options).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions