Use find instead of take 1 and filter

This commit is contained in:
Joseph C. Sible 2020-02-09 19:40:57 -05:00
parent cb01cbf7eb
commit cc424bac11
2 changed files with 4 additions and 4 deletions

View file

@ -748,7 +748,7 @@ checkAliasesExpandEarly = CommandCheck (Exactly "alias") (f . arguments)
where
f = mapM_ checkArg
checkArg arg | '=' `elem` concat (oversimplify arg) =
forM_ (take 1 $ filter (not . isLiteral) $ getWordParts arg) $
forM_ (find (not . isLiteral) $ getWordParts arg) $
\x -> warn (getId x) 2139 "This expands when defined, not when used. Consider escaping."
checkArg _ = return ()