-
Notifications
You must be signed in to change notification settings - Fork 379
Open
Labels
Description
Hello,
I would like to format footer output using configured width as well as to take into account terminal geometry.
Consider the following example:
$ ./app subcommand --help
SYNOPSIS
subcommand [OPTIONS]
OPTIONS
--option1 TEXT Some description for this option
--flag1 Some description for this flag
--flag2 Some description for this flag
-h,--help Print this help message and quit
DESCRIPTION
Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet, consectetur adipiscing elit,\n
sed do eiusmod tempor incididunt ut labore et dolor\n
magna aliqua. Ut enim ad minim veniam, quis nostrud\n
exercitation ullamco laboris nisi ut aliquip ex ea commodo\n
consequat. Duis aute irure dolor in reprehenderit in voluptate\n
velit esse cillum dolore eu fugiat nulla pariatur.\n
Excepteur sint occaecat cupidatat non proident, sunt in culpa\n
qui officia deserunt mollit anim id est laborum.\n
Here DESCRIPTION
is the footer text. And right now I forced to split string manually using "\n". I do not want to split the footer string manually. I want pass the whole string to the footer()
and not worried about line breaks. I would like to calculate terminal geometry (internally) and set footer width at CLI11 configuring time. Some examples:
app.footer_width(78);
cmd.get_fooler().width(78);
cmd->footer(string, 78);
This is probably an unrelated task, one would be even better if I could align the text to the right border. For example: