Skip to content

[ANN] optparse 1.5 released

Latest
Compare
Choose a tag to compare
@gvvaughan gvvaughan released this 31 Jul 01:31
· 0 commits to master since this release

Automatically generate a custom command-line option parser from just the long-form help text for your program.

I am happy to announce release 1.5 of optparse.

Optparse's home page is at https://github.com/gvvaughan/optparse, with documentation at https://gvvaughan.github.io/optparse.

This was the option parser I originally wrote for Specl, and later donated to lua-stdlib. Even though I’ve been unable to complete the slimming down of lua-stdlib in preparation for the next release, you can continue to use optparse without any of stdlib.

This release fixes another long standing bug.

Install it with LuaRocks, using:

luarocks install optparse 1.5

Noteworthy changes in release 1.5 (2022-07-30) [stable]

Bug fixes

  • The parser no longer shadows the internal optparse.version
    on_handler by also saving the last word of the parsed
    versiontext into optparse.version.

    But, we don't want to break existing clients that use the content
    of the saved optparse.version string either. Since the
    on_handler was never available to callers before due to being
    shadowed, rename it to optparse.showversion.

Incompatible changes

  • For consistency with the renaming of optparse.showversion,
    similarly rename optparse.help to optparse.showhelp. For
    backwards compatibility, optparse.help continues to be available
    too, but is now undocumented. Consider using the showhelp in
    your projects, especially if you also start using showversion.