7 Commits

Author SHA1 Message Date
Zane Duffield
994b076174 Simply copyright and author header components when empty
Some checks failed
CI with JUnit Report / build-and-test (push) Has been cancelled
2026-01-18 12:21:50 -05:00
Zane Duffield
7aedd40945 Add .shellcheckrc to silence lints 2026-01-18 12:21:50 -05:00
Zane Duffield
4bff72f4d2 Fix misc shellcheck issues
* make clear that array expansion was not desired in one case
* change `$@` to `$*` in one case
* remove unnecessary `$` in arithmetic context
* fix quoting in complex traceback message
2026-01-18 12:21:49 -05:00
Zane Duffield
5988b10d16 Fix array expansion errors on unknown parameter names
When unexpected parameters are passed to cmdarg, the shell (bash 5.1.8)
spits out some error messages about bad array subscripts, for example

> cmdarg.sh: line 333: CMDARG_FLAGS: bad array subscript
> cmdarg.sh: line 334: CMDARG_FLAGS: bad array subscript
> cmdarg.sh: line 340: CMDARG: bad array subscript

This occurs because the array is being indexed by a null value, so to
prevent it we must guard all such uses with a check.
2026-01-18 12:21:49 -05:00
Zane Duffield
a75144bf94 Quote array expansion when appending to cmdarg_argv
Without this change, excess arguments are split and glob-expanded when
appended to the cmdarg_argv array.
2026-01-18 12:21:49 -05:00
Zane Duffield
35b6965e5d Quote variables to avoid word splitting a glob matching
In all cases here, the contents of the variables are single words and do
not contain special glob characters, so it's mostly a change for
consistency and best practice.
2026-01-18 12:21:48 -05:00
Zane Duffield
489d6d1ee8 Convert tabs to spaces
The script used mixed indentation, meaning that it only made sense to
read when the tab width was set properly (to 8). Using consistent
indentation makes the script easier to read.
2026-01-18 12:21:48 -05:00

Diff Content Not Available