mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-12 08:06:29 -07:00
Simplify actualArgs
This commit is contained in:
parent
46f177b5be
commit
0607039d41
1 changed files with 1 additions and 1 deletions
|
@ -122,7 +122,7 @@ checkGetOpts str flags args f =
|
|||
toTokens = map (T_Literal (Id 0)) . words
|
||||
opts = fromMaybe [] $ f (toTokens str)
|
||||
actualFlags = filter (not . null) $ map fst opts
|
||||
actualArgs = map (\(_, (_, x)) -> onlyLiteralString x) $ filter (null . fst) opts
|
||||
actualArgs = [onlyLiteralString x | ("", (_, x)) <- opts]
|
||||
|
||||
-- Short options
|
||||
prop_checkGetOptsS1 = checkGetOpts "-f x" ["f"] [] $ getOpts (True, True) "f:" []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue