CLI11 icon indicating copy to clipboard operation
CLI11 copied to clipboard

Adding a space between option aliases in help text [FEATURE REQUEST]

Open LostInCompilation opened this issue 2 years ago • 1 comments

Currently the generated help text looks like this:

Options:
  -h,--help                             Print this help message and exit
  -v,--version                          Print App version

I suggest adding a space between the aliases for better readability:

Options:
  -h, --help                             Print this help message and exit
  -v, --version                          Print App version

I didn't find an option for that in the docs. Writing a custom formatter just for that seems a bit overkill.

LostInCompilation avatar Mar 09 '23 22:03 LostInCompilation

EDIT: Below is not correct. I made a PR which indirectly solves this issue by completely reformatting the help output #866

~~I just digged through the code. It seems like this isn't even possible with a custom formatter. The only way would be to directly edit std::string Option::get_name(bool positional, bool all_options) and change the delimiter for the join function: detail::join(name_list, ", ");~~

~~I can make a PR on this. Maybe I'll also look at #353.~~

LostInCompilation avatar Mar 09 '23 23:03 LostInCompilation