Fix incorrect detection of bash-style substring expansion

Substring expansion detection only considers ':' as a separator..  It
needs to avoid triggering for ":-", ":=", ":+" and ":?", since they
mean other things.

This is a regression introduced by commit
a90b6d14b3

Signed-off-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
Martin Schwenke 2017-07-20 09:20:37 +10:00
parent d6803ffa24
commit 807d899f3b
1 changed files with 1 additions and 1 deletions

View File

@ -623,7 +623,7 @@ getOffsetReferences mods = fromMaybe [] $ do
offsets <- match !!! 0 offsets <- match !!! 0
return $ matchAllStrings variableNameRegex offsets return $ matchAllStrings variableNameRegex offsets
where where
re = mkRegex "^ *:(.*)" re = mkRegex "^ *:([^-=?+].*)"
getReferencedVariables parents t = getReferencedVariables parents t =
case t of case t of