Skip to content

v26.1

Latest

Choose a tag to compare

@BetterScripts BetterScripts released this 10 Jul 14:50

Major Update

BREAKING CHANGES! (See below.)

More complete list of changes available in CHANGES.MD.

NEW

  • Name: BetterScripts shtoolkit.
  • Libraries:
    • libmap.sh - emulated associative arrays for any shell.
    • libpath.sh - commands to assist with path processing, including path information like size, owner, etc and a portable mktemp alternative.
    • libstring.sh - commands assist with string processing.
  • Simple debugging support across all libraries.

CHANGES & FIXES

  • BREAKING CHANGE Significantly reworked libarray.sh which is now more robust, and more consistent.
  • General improvements across all libraries.
  • Test harness updates and changes for correctness, robustness, and portability.

LIBARRAY

Changes required result in differences verses previous library versions - some previously supported usage is no longer works:

  • Pattern matching has been completely rewritten - it is now more portable, robust, and the same options are available everywhere. Some previously working matches will no longer match. Affects array_remove, array_search, array_contains, andarray_split.
  • Command options now MUST precede any non-option arguments. Affects array_from_path.
  • array_printf no longer writes anything for empty arrays (previously a single <newline> would be written).