Tags: andsens/docopt.sh
Tags
Major release === This is complete rewrite of the underlying parser for the docopt language. docopt.sh now uses [docopt-parser](https://github.com/andsens/docopt-parser) to generate an AST. Error messages are considerably improved, showing (most of the time) what exactly is wrong, outputting the offending line and numbering it. e.g.: ``` 08 --push Push the new tag and branch upstream ~~~~~~ --push is not referenced from the usage section ``` The bash minification is now more effective, reducing the number of lines (with -n=80) by ~20%. Some shellcheck warnings have been disabled/fixed, resulting inlined code passing all tests. Changes since v2.0.0-alpha4: * Merge branch 'ft-docopt-parser' * Fix bug where --opt=false threw a user error
v2.0.0-alpha1 ------ Changes since v1.0.0: * github actions: Add docopt-lib.sh release job * Update list of bash versions to test with * Don't test in python < 3.11 any longer * Add test to ensure multibyte chars work with the usage substring * Leave $DOCOPT_PREFIX/$p unquoted and add shellcheck ignores * minify: Split up single-quoted strings over multiple lines * Improve code comments * Reduce parser size by reusing one varnames array * Reduce parser size by concatenating eval statements * Use merge_identical_nodes to reduce parser size * Remove need for $left array * Add abstract documentation for how it all works * Save entire options meta to a single array * Fix minifying issue with single quoted strings * Reduce parser size by ~30 lines * Shorter varname for $prefix ($p) * Considerably improve minification of the bash library * Add inline documentation to the bash parsing library * Switch to docopt-parser
v2.0.0-alpha1 ------ Changes since v1.0.0: * github actions: Add docopt-lib.sh release job * Update list of bash versions to test with * Don't test in python < 3.11 any longer * Add test to ensure multibyte chars work with the usage substring * Leave $DOCOPT_PREFIX/$p unquoted and add shellcheck ignores * minify: Split up single-quoted strings over multiple lines * Improve code comments * Reduce parser size by reusing one varnames array * Reduce parser size by concatenating eval statements * Use merge_identical_nodes to reduce parser size * Remove need for $left array * Add abstract documentation for how it all works * Save entire options meta to a single array * Fix minifying issue with single quoted strings * Reduce parser size by ~30 lines * Shorter varname for $prefix ($p) * Considerably improve minification of the bash library * Add inline documentation to the bash parsing library * Switch to docopt-parser
Add upkg.json so docopt-lib can be installed as a upkg dependency
Add bpkg.json so docopt-lib can be installed as a bpkg dependency
v1.0.0 release! A small change from v0.9.17 is the addition of another "shellcheck disable=". Otherwise it is identical. v0.9.17 has been stable and no bugs have been found over prolonged use, so that's as good a reason as any to declare the API stable and signal a proper release
PreviousNext