Warn about while read f; do ssh "$f"; done

This commit is contained in:
Vidar Holen 2013-11-29 23:05:41 -08:00
parent d4bc0f6e10
commit a4d36ba0d2
2 changed files with 37 additions and 1 deletions

View file

@ -308,7 +308,7 @@ readConditionContents single = do
id <- getNextId
x <- try (string "||" <|> string "-o")
when (single && x == "||") $ addNoteFor id $ Note ErrorC 1024 "You can't use || inside [..]. Use [[..]] instead."
when (not single && x == "-o") $ addNoteFor id $ Note ErrorC 1025 "In [[..]], use && instead of -o."
when (not single && x == "-o") $ addNoteFor id $ Note ErrorC 1025 "In [[..]], use || instead of -o."
softCondSpacing
return $ TC_Or id typ x