Fixed warning for [[ greplol ]]

This commit is contained in:
Vidar Holen 2012-12-02 14:15:50 -08:00
parent 55a4c3c44f
commit 35b8d58c3e
1 changed files with 3 additions and 2 deletions

View File

@ -205,8 +205,9 @@ called s p = do
readConditionContents single = do
readCondContents `attempting` (lookAhead $ do
pos <- getPosition
choice (map (try . string) commonCommands)
parseProblemAt pos WarningC "Use 'if cmd; then ..' to check exit code, or 'if [[ $(cmd) == .. ]]' to check output.")
s <- many1 letter
when (s `elem` commonCommands) $
parseProblemAt pos WarningC "Use 'if cmd; then ..' to check exit code, or 'if [[ $(cmd) == .. ]]' to check output.")
where
typ = if single then SingleBracket else DoubleBracket