mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-13 00:23:20 -07:00
Fix parsing of [$var] (fixes #2309)
This commit is contained in:
parent
ecacc2e9bb
commit
081f7eba24
5 changed files with 54 additions and 19 deletions
|
@ -845,6 +845,9 @@ checkAliasesExpandEarly = CommandCheck (Exactly "alias") (f . arguments)
|
|||
|
||||
prop_checkUnsetGlobs1 = verify checkUnsetGlobs "unset foo[1]"
|
||||
prop_checkUnsetGlobs2 = verifyNot checkUnsetGlobs "unset foo"
|
||||
prop_checkUnsetGlobs3 = verify checkUnsetGlobs "unset foo[$i]"
|
||||
prop_checkUnsetGlobs4 = verify checkUnsetGlobs "unset foo[x${i}y]"
|
||||
prop_checkUnsetGlobs5 = verifyNot checkUnsetGlobs "unset foo]["
|
||||
checkUnsetGlobs = CommandCheck (Exactly "unset") (mapM_ check . arguments)
|
||||
where
|
||||
check arg =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue