mirror of
https://github.com/octoleo/hosts.git
synced 2025-01-04 06:37:39 +00:00
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.
This commit is contained in:
parent
0b955f41fa
commit
a869da8e4e
4
hosts
4
hosts
@ -256,8 +256,8 @@ done
|
|||||||
# provides an array that is equivalent to $* and $@ within each command
|
# provides an array that is equivalent to $* and $@ within each command
|
||||||
# function, though the array is zero-indexed, which could lead to confusion.
|
# 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
|
# Use `unset` to remove the first element rather than slicing (e.g.,
|
||||||
# `_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[*]})
|
||||||
|
Loading…
Reference in New Issue
Block a user