diff --git a/SC2068.md b/SC2068.md index 839c030..156a712 100644 --- a/SC2068.md +++ b/SC2068.md @@ -1,4 +1,4 @@ -## Add double quotes around ${@}, otherwise it's just like $* and breaks on spaces. +## Double quote array expansions to avoid re-splitting elements. ### Problematic code: @@ -10,7 +10,7 @@ ### Rationale: -Double quotes around `$@` prevents globbing and word splitting while still expanding to multiple separate arguments. +Double quotes around `$@` (and similarly, `${array[@]}`) prevents globbing and word splitting of individual elements, while still expanding to multiple separate arguments. Let's say you have three arguments: `baz`, `foo bar` and `*`