mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-12 08:06:29 -07:00
Made SC2082 indirection message more sh friendly.
This commit is contained in:
parent
09b7788412
commit
1ab29ddb39
1 changed files with 1 additions and 1 deletions
|
@ -1880,7 +1880,7 @@ prop_checkIndirectExpansion4 = verify checkIndirectExpansion "${var${n}_$((i%2))
|
|||
prop_checkIndirectExpansion5 = verifyNot checkIndirectExpansion "${bar}"
|
||||
checkIndirectExpansion _ (T_DollarBraced i (T_NormalWord _ contents)) =
|
||||
when (isIndirection contents) $
|
||||
err i 2082 "To expand via indirection, use name=\"foo$n\"; echo \"${!name}\"."
|
||||
err i 2082 "To expand via indirection, use arrays, ${!name} or (for sh only) eval."
|
||||
where
|
||||
isIndirection vars =
|
||||
let list = mapMaybe isIndirectionPart vars in
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue