cmdarg icon indicating copy to clipboard operation
cmdarg copied to clipboard

Support bash set -u / nounset (unset noun) checks

Open neechbear opened this issue 8 years ago • 0 comments

Explicitly assigned positional arguments in some functions to named variables, defaulting to an empty string if undefined. This aides readability in some places, and prevents errors with omission of optional arguments when using bash's "set -u" / nounset shell attribute.

Added some missing quotes that would have caused syntax errors or unexpected argument shifts with unset variables.

Explicitly added assignment of empty lists () on initial array and associative array declaration to avoid unexpected behaviour with slightly older bash < 4.3 versions.

Removed explicit set -u and set +u statements as they have no business being in a library. ;-)

neechbear avatar Nov 13 '16 21:11 neechbear