Repository navigation
0.2.0
0.2.0
Added
-
Options for minifying generated completion scripts:
--minify-global-namesrename all global functions and variables to use
short generated names--minify-local-variablesrename local variables to single-letter names--no-commentsstrip comments from the output--no-whitespaceremove all unnecessary whitespace including indentation--optimize-case-statementsdetect sequences of cases with the same body
and combine them
-
Arg_parser.Completion.stringifyremoves the type constraint on a
Arg_parser.Completion.tfor situations where you want to use a completion
for one type in aconvof a different type. Doing so is a little risky but
there's no technical reason to forbid it and it may simplify writing
parsers.
Changed
-
Arg_parser.Completion.fileis now a_ t(formerly it was astring t).
Sometimes you want to complete with files in a parser which doesn't yield
paths, or use a non-string type to represent paths. E.g.dune buildaccepts
build targets as arguments but it's convenient to be able to complete that
command with files (at least until dune's completion script understands
targets!). -
Completion scripts are indented by 2 spaces rather than 4 to make them more
readable on small monitors. -
Refactored generated bash scripts to avoid generating a function for each
argument. This is important as dune has many subcommands, each with many
arguments, and generating a function for each one can create completion
scripts over 1mb!