mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-08 05:51:09 -07:00
Recognize local -x
similarly to export
(fixes #2069)
This commit is contained in:
parent
218deb6d01
commit
8d99926554
2 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue