* 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
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.
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.
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.