From 850f210a4fa6a59da2f713efc223552939352e27 Mon Sep 17 00:00:00 2001 From: William Melody Date: Sat, 14 Mar 2020 19:03:50 -0700 Subject: [PATCH] Assign command parameters as quoted array. Satisfies Shellcheck SC2206 https://github.com/koalaman/shellcheck/wiki/SC2206 --- hosts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts b/hosts index 4094349..991bcaf 100755 --- a/hosts +++ b/hosts @@ -212,7 +212,7 @@ done # `_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 # into a new array. -_COMMAND_PARAMETERS=(${_COMMAND_ARGV[*]}) +_COMMAND_PARAMETERS=("${_COMMAND_ARGV[@]}") unset "_COMMAND_PARAMETERS[0]" _debug printf \