Add less common actions to find -o check.

This commit is contained in:
Vidar Holen 2017-03-03 20:43:00 -08:00
parent 2154583fd3
commit 750212af39
1 changed files with 1 additions and 1 deletions

View File

@ -363,7 +363,7 @@ checkFindActionPrecedence = CommandCheck (Basename "find") (f . arguments)
then warnFor (list !! (length pattern - 1)) then warnFor (list !! (length pattern - 1))
else f rest else f rest
isMatch = isParam [ "-name", "-regex", "-iname", "-iregex", "-wholename", "-iwholename" ] isMatch = isParam [ "-name", "-regex", "-iname", "-iregex", "-wholename", "-iwholename" ]
isAction = isParam [ "-exec", "-execdir", "-delete", "-print", "-print0" ] isAction = isParam [ "-exec", "-execdir", "-delete", "-print", "-print0", "-fls", "-fprint", "-fprint0", "-fprintf", "-ls", "-ok", "-okdir", "-printf" ]
isParam strs t = fromMaybe False $ do isParam strs t = fromMaybe False $ do
param <- getLiteralString t param <- getLiteralString t
return $ param `elem` strs return $ param `elem` strs