mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-09-30 00:39:19 +08:00
Use syntactic sugar instead of building lists by hand
This commit is contained in:
@@ -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 <-
|
||||
|
Reference in New Issue
Block a user