From 0d504f44d9a30ddbe97b541385a24a4178f17876 Mon Sep 17 00:00:00 2001 From: Adrian Fluturel Date: Tue, 31 Dec 2024 03:40:47 +0100 Subject: [PATCH] Add bang as a valid char for function names --- src/ShellCheck/Parser.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ShellCheck/Parser.hs b/src/ShellCheck/Parser.hs index 9628b2e..f1ff26a 100644 --- a/src/ShellCheck/Parser.hs +++ b/src/ShellCheck/Parser.hs @@ -67,7 +67,7 @@ doubleQuote = char '"' variableStart = upper <|> lower <|> oneOf "_" variableChars = upper <|> lower <|> digit <|> oneOf "_" -- Chars to allow in function names -functionChars = variableChars <|> oneOf ":+?-./^@," +functionChars = variableChars <|> oneOf "#:+?-./^@," -- Chars to allow in functions using the 'function' keyword extendedFunctionChars = functionChars <|> oneOf "[]*=!" specialVariable = oneOf (concat specialVariables)