Added more helpful message for 'if [ grep .. ]'

This commit is contained in:
Vidar Holen 2012-11-26 22:23:40 -08:00
parent 7025ebd633
commit 34690ad3db
1 changed files with 1 additions and 1 deletions

View File

@ -166,7 +166,7 @@ readConditionContents single = do
readCondContents `attempting` (lookAhead $ do readCondContents `attempting` (lookAhead $ do
pos <- getPosition pos <- getPosition
choice (map (try . string) commonCommands) choice (map (try . string) commonCommands)
parseProblemAt pos WarningC "To check a command, skip [] and just do 'if foo | grep bar; then'.") parseProblemAt pos WarningC "Use 'if cmd; then ..' to check exit code, or 'if [[ $(cmd) == .. ]]' to check output.")
where where
typ = if single then SingleBracket else DoubleBracket typ = if single then SingleBracket else DoubleBracket