Don't consider .* a glob-like regex (fixes #1214)

This commit is contained in:
Vidar Holen 2019-07-04 17:09:28 -07:00
parent c0d3a98fcd
commit 914974bd4f
2 changed files with 5 additions and 2 deletions

View file

@ -791,7 +791,7 @@ isCommandMatch token matcher = fromMaybe False $
-- False: .*foo.*
isConfusedGlobRegex :: String -> Bool
isConfusedGlobRegex ('*':_) = True
isConfusedGlobRegex [x,'*'] | x /= '\\' = True
isConfusedGlobRegex [x,'*'] | x `notElem` "\\." = True
isConfusedGlobRegex _ = False
isVariableStartChar x = x == '_' || isAsciiLower x || isAsciiUpper x