Applicative option parser
Change pretty printer layout algorithm used.
The layoutSmart algorithm appears to be extremely slow with some command line sets, to the point where the program appears to hang.
Fixes issues:
Render help text with AnsiStyle
aware rendering functions.
Move to 'prettyprinter` library for pretty printing.
This is a potentially breaking change when one uses the '*Doc' family of functions
(like headerDoc
) from Options.Applicative
. However, as versions of
'ansi-wl-pprint > 1.0' export a compatible Doc
type, this can be mitigated by
using a recent version.
One can also either import directly from Options.Applicative.Help
or from the
Prettyprinter
module of 'prettyprinter'.
Allow commands to be disambiguated in a similar manner to flags when the
disambiguate
modifier is used.
This is a potentially breaking change as the internal CmdReader
constructor
has been adapted so it is able to be inspected to a greater degree to support
finding prefix matches.
Widen bounds for ansi-wl-pprint
. This supports the use of prettyprinter
in a non-breaking way, as the ansi-wl-pprint > 1.0
support the newer
library.
Export helpIndent
from Options.Applicative
.
Export completion script generators from Options.Applicative.BashCompletion
.
Add simpleVersioner
utility for adding a '--version' option to a parser.
Improve documentation.
Make tabulation width configurable in usage texts.
Separate program name and description in ParserHelp type.
Add helperWith
function, which can be easily used to
localize the help flag.
Improve usage texts when command names are long.
Improve Documentation.
Guard process dependency behind an on by default flag. This allows one to shrink the dependency tree significantly by turning off the ability to use bash completion actions.
Remove bytestring dependency from the test suite.
Add Options.Applicative.NonEmpty.some1
function, which
parses options the same as some1
from base, but doesn't
cause duplicates in the usage texts.
Further improve help text generation in the presence of optional values when nesting is involved, and many and some when displayed with a suffix.
Add "global" options to the usage texts for subcommands. When using subcommands, a "global options" section can now appear below the options and commands sections.
Global options are off by default, to enable them, use
the helpShowGlobals
modifier.
The noGlobal
builder will suppress a single option being
displayed in the global options list.
Fixes issues:
--help
Allow the --help
option to take the name of a command.
Usage without any arguments is the same, but now, when an
argument is given, if it is the name of a currently
reachable command, the help text for that command will
be show.
Fixes issues:
Updated dependency bounds.
Add builder for the all positional parser policy.
Remove deprecated functions
Add support for GHC 8.8.1.
Add subparserInline
modifier as additional way of
executing subparsers. When activated, the subparser
parse tree will be inserted into that of the parent
instead of being run independently, allowing mixing
of child and parent options.
Improve rendering of complex nested parse structures. Previously, brackets and parenthesis did not respect whether or not options had to be defined together. Now the parse tree is more accurately represeted in the help text.
Add helpLongEquals
modifier, which will change how
long options are printed in the help text, adding an
equals sign, for example "--input=FILE".
Updated dependency bounds.
Clean ups and Documentation.
Updated dependency bounds.
Fix tab completion with Commands being unreachable.
Clean ups and Documentation.