-
The parser no longer shadows the internal
optparse.version
on_handler
by also saving the last word of the parsedversiontext
intooptparse.version
.But, we don't want to break existing clients that use the content of the saved
optparse.version
string either. Since theon_handler
was never available to callers before due to being shadowed, rename it tooptparse.showversion
.
- For consistency with the renaming of
optparse.showversion
, similarly renameoptparse.help
tooptparse.showhelp
. For backwards compatibility,optparse.help
continues to be available too, but is now undocumented. Consider using theshowhelp
in your projects, especially if you also start usingshowversion
.
-
Initial support for Lua 5.4.
-
No need to preinstall
std._debug
andstd.normalize
for deployment, of course without runtime checking. In development environments, installedstd._debug
,std.strict
will be loaded and used for runtime checks as before.
- Don't hang when option description text contains a '-' character.
- Don't hang when help text has a bare '-' as the first non-whitespace character on the line.
- The implementation now depends upon and requires the luarocks modules
std.normalize
andstd._debug
.
-
Don't crash when first unrecognized argument is also a handler name (boolean, file, finished, flag, etc...)
-
Don't hang when help text option table formats long option name on its own line before indented description.
- Update for change in std.strict module path.
optparse._VERSION
is nowoptparse.version
for consistency with other former stdlib modules.
- If lua-stdlib's
std.debug_init
module is loadable and has_DEBUG.strict
set tofalse
, then don't try to load the standalonestrict
module.
-
Uninstalled
std.debug_init
is handled correctly. -
optparse._VERSION
is now documented properly.
- Propagate metatable to parser factory output objects.
- Initial release, now separated out from lua-stdlib.