mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-08 12:37:14 +08:00
Recognize local -x
similarly to export
(fixes #2069)
This commit is contained in:
@@ -547,6 +547,9 @@ getReferencedVariableCommand base@(T_SimpleCommand _ _ (T_NormalWord _ (T_Litera
|
||||
(not $ any (`elem` flags) ["f", "F"])
|
||||
then concatMap getReference rest
|
||||
else []
|
||||
"local" -> if "x" `elem` flags
|
||||
then concatMap getReference rest
|
||||
else []
|
||||
"trap" ->
|
||||
case rest of
|
||||
head:_ -> map (\x -> (base, head, x)) $ getVariablesFromLiteralToken head
|
||||
|
Reference in New Issue
Block a user