From a869da8e4e007c4fc8e2b8c772924965517e2758 Mon Sep 17 00:00:00 2001 From: William Melody Date: Mon, 19 Oct 2015 16:50:48 -0700 Subject: [PATCH] Clarify slicing example in `$_COMMAND_PARAMETERS` comment. The example assignment should have balanced quotes to avoid any copy / paste errors or reader confusion. Remove the 'not' since it's clearer if this is used as a parenthetical example of slicing. --- hosts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hosts b/hosts index ff1b0e7..7109c15 100755 --- a/hosts +++ b/hosts @@ -256,8 +256,8 @@ done # provides an array that is equivalent to $* and $@ within each command # function, though the array is zero-indexed, which could lead to confusion. # -# Use `unset` to remove the first element rather than slicing (e.g., not -# `_COMMAND_PARAMETERS=("${_COMMAND_ARGV[@]:1})`) because under bash 3.2 the +# Use `unset` to remove the first element rather than slicing (e.g., +# `_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[*]})