Releases: vlisivka/bash-modules
Releases · vlisivka/bash-modules
Version 4.0.1
- Built-in help function now accepts arbitrary prefixes.
- Documentation generated in Markdown and HTML format, see http://vlisivka.github.io/bash-modules/.
Few fixes since beta1
Some bug fixes and few improvements since beta1:
- compatibility script for basher (to use bash-modules without installation) is added.
is_function
anddispatch
functions are added tometa
module.- support for configuration file in user directory is added, and few other improvements.
New major version of bash-modules
- Backward compatibility is broken.
- Few new functions are added.
- More examples
- More documentation.
- Unit test cases are updated and test cases for import.sh and install.sh are added.
- Unnecessary code is removed.
Feedback is welcome.
Bugfixes
Support for required options and options with additonal checks is added.
Now option types can be one letter (S, B, I, A, N), short (Str, Bool, Incr, Num), or full (String, Boolean, Incremental, Number), for better code reader experience.
Options can be marked as required (R, Req, Required):
parse_arguments '-f|--foo)FOO;String,Required' '-b|--bar)BAR;S,R' -- "$@" || exit $?
Additional checks can be added to options. Checks are executed after argument parsing cycle. Example:
'-f)FOO;Number,Required, (( FOO > 2 ))' \
'-b)BAR;Number, (( BAR > FOO*2 ))' \
'-B)BAZ;String,Required, [[ "$BAZ" =~ foo* ]]' \
...
Dependency on perl is removed
- Small cosmetic fixes.
- function END is added again for better looking code
- dependency on perl is removed from spec file, so containers will be smaller but help text will look ugly.
Fix for "uninitialized variable" problem on Fedora 21
bash-4.3.30 started to throw errors when script tries to get length of empty array in "unused_vars" (set -u) mode, so here is the fix.