group package:optparse-applicative
(group x) tries laying out
x into a single
line by removing the contained line breaks; if this does not fit the
page, or when a
hardline within
x prevents it from
being flattened,
x is laid out without any changes.
The
group function is key to layouts that adapt to available
space nicely.
See
vcat,
line, or
flatAlt for examples that are
related, or make good use of it.
Render flattened text on this line, or start a new line before
rendering any text.
This will also nest subsequent lines in the group.
Add a description to a group of commands.
Advanced feature for separating logical groups of commands on the
parse line.
If using the same
metavar for each group of commands, it may
yield a more attractive usage text combined with
hidden for
some groups.
Group options together under a common heading in the help text.
For example, if we have:
Args
<$> parseMain
<*> parserOptionGroup "Group A" parseA
<*> parserOptionGroup "Group B" parseB
<*> parseOther
Then the help page will look like:
Available options:
<main options>
<other options>
Group A
<A options>
Group B
<B options>
Groups for optionals. Can be multiple in the case of nested groups.