From 3824e9cfc2aa0c2a8eafc08446bb1b3bb47dacd4 Mon Sep 17 00:00:00 2001
From: Vidar Holen <spam@vidarholen.net>
Date: Thu, 15 May 2014 09:14:57 -0700
Subject: [PATCH] Fixed not recognizing --f=* as option in checkGrepRe

---
 ShellCheck/Analytics.hs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ShellCheck/Analytics.hs b/ShellCheck/Analytics.hs
index 2ea2e04..34566cd 100644
--- a/ShellCheck/Analytics.hs
+++ b/ShellCheck/Analytics.hs
@@ -1490,13 +1490,14 @@ prop_checkGrepRe7 = verify checkGrepRe "grep *foo* file"
 prop_checkGrepRe8 = verify checkGrepRe "ls | grep foo*.jpg"
 prop_checkGrepRe9 = verifyNot checkGrepRe "grep '[0-9]*' file"
 prop_checkGrepRe10= verifyNot checkGrepRe "grep '^aa*' file"
+prop_checkGrepRe11= verifyNot checkGrepRe "grep --include=*.png foo"
 
 checkGrepRe _ = checkCommand "grep" (const f) where
     -- --regex=*(extglob) doesn't work. Fixme?
     skippable (Just s) = not ("--regex=" `isPrefixOf` s) && "-" `isPrefixOf` s
     skippable _ = False
     f [] = return ()
-    f (x:r) | skippable (getLiteralString x) = f r
+    f (x:r) | skippable (getLiteralStringExt (const $ return "_") x) = f r
     f (re:_) = do
         when (isGlob re) $ do
             warn (getId re) 2062 $ "Quote the grep pattern so the shell won't interpret it."