1
0
mirror of https://github.com/octoleo/hosts.git synced 2024-11-28 15:56:33 +00:00

Assign command parameters as quoted array.

Satisfies Shellcheck SC2206
https://github.com/koalaman/shellcheck/wiki/SC2206
This commit is contained in:
William Melody 2020-03-14 19:03:50 -07:00
parent fe48de86f1
commit 850f210a4f

2
hosts
View File

@ -212,7 +212,7 @@ done
# `_COMMAND_PARAMETERS=("${_COMMAND_ARGV[@]:1}")`) because under bash 3.2 the # `_COMMAND_PARAMETERS=("${_COMMAND_ARGV[@]:1}")`) because under bash 3.2 the
# resulting slice is treated as a quoted string and doesn't easily get coaxed # resulting slice is treated as a quoted string and doesn't easily get coaxed
# into a new array. # into a new array.
_COMMAND_PARAMETERS=(${_COMMAND_ARGV[*]}) _COMMAND_PARAMETERS=("${_COMMAND_ARGV[@]}")
unset "_COMMAND_PARAMETERS[0]" unset "_COMMAND_PARAMETERS[0]"
_debug printf \ _debug printf \