Indexed-array helpers for Base-style Bash scripts.
Source lib/bash/std/lib_std.sh before this library so validation and error
helpers are available.
list_appendAppend one or more values to a named indexed array.list_prependPrepend one or more values to a named indexed array.list_removeRemove all exact matches from a named indexed array.list_containsPredicate that checks whether a named indexed array contains a value.list_uniqueStore first-seen unique values in a named result array.list_lengthStore an array length in a named result variable.
source "/absolute/path/to/lib/bash/std/lib_std.sh"
source "/absolute/path/to/lib/bash/list/lib_list.sh"
declare -a packages=("jq")
list_append packages "shellcheck" "bats-core"
list_prepend packages "bash"
if list_contains "shellcheck" packages; then
log_info "ShellCheck validation is available."
fiMutating helpers update the caller-owned array in place. Result helpers accept
the name of the output variable, validate it with assert_variable_name, and
avoid stdout capture for caller state.
BATS coverage lives in tests/lib_list.bats.