cli._VERSIONhas been renamed tocli.VERSION
Function renames
The functions for defining arguments of all types have been renamed to drop the
_add prefix from their names. This affects the following functions:
cli:add_argumenthas been renamed tocli:argumentcli:add_optionhas been renamed tocli:optioncli:add_flaghas been renamed tocli:flagcli:optarghas been renamed tocli:splat
Function alias removals
cli:add_opthas been removed. Usecli:optioninsteadcli:add_arghas been removed. Usecli:argumentinsteadcli:parse_argshas been removed. Usecli:parseinstead
cli:parse() invocation changes
cli:parse() no longer accepts the auxiliary arguments noprint and dump as the second and third arguments; only one argument is now accepted and that is a custom arguments table. If left unspecified, we use the global _G['arg'] program argument table as usual.
So, the new signature is:
cli:parse(args: table) -> table
- to make the parser silent, use
cli:set_silent(true)before invoking the parser - to generate the internal state dump, a runtime argument
--__DUMP__must be passed as the first argument
Private function are now hidden
Hopefully you weren't relying on any of these because they are no longer exposed, and they weren't documented. The affected previous exports are:
cli:__lookup()cli:__add_opt()