For bugs with existing features
Here's a snippet or screenshot that shows the problem:
#!/bin/bash
array=( foo bar baz )
del_index=1
unset 'array[del_index]'
for index in "${!array[@]}"; do
echo "$index: ${array[$index]}"
done
Here's what shellcheck currently says:
Line 4:
del_index=1
^-- SC2034 (warning): del_index appears unused. Verify use (or export if used externally).
Here's what I wanted or expected to see:
(no output)
Note:
The erroneous warning is shown when I use either of:
unset 'array[del_index]'
unset 'array[$del_index]'