mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-08 16:26:26 +08:00
Fix parsing of [$var] (fixes #2309)
This commit is contained in:
@@ -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 =
|
||||
|
Reference in New Issue
Block a user