mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-07 13:31:36 -07:00
Use syntactic sugar instead of building lists by hand
This commit is contained in:
parent
dfbcc9595e
commit
8480563672
3 changed files with 5 additions and 5 deletions
|
@ -177,7 +177,7 @@ getOpts (gnu, arbitraryLongOpts) string longopts args = process args
|
|||
process [] = return []
|
||||
process (token:rest) = do
|
||||
case getLiteralStringDef "\0" token of
|
||||
'-':'-':[] -> return $ listToArgs rest
|
||||
"--" -> return $ listToArgs rest
|
||||
'-':'-':word -> do
|
||||
let (name, arg) = span (/= '=') word
|
||||
needsArg <-
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue