diff --git a/ShellCheck/ASTLib.hs b/ShellCheck/ASTLib.hs index 80fad09..77839af 100644 --- a/ShellCheck/ASTLib.hs +++ b/ShellCheck/ASTLib.hs @@ -329,7 +329,8 @@ getAssociativeArrays t = f :: Token -> Writer [String] () f t@T_SimpleCommand {} = fromMaybe (return ()) $ do name <- getCommandName t - guard $ name == "declare" || name == "typeset" + let assocNames = ["declare","local","typeset"] + guard $ elem name assocNames let flags = getAllFlags t guard $ elem "A" $ map snd flags let args = map fst . filter ((==) "" . snd) $ flags