Commit 8630b80a authored by Mikhail Glushenkov's avatar Mikhail Glushenkov
Browse files

Better warning for unrecognised options.

Fixes #1693.
parent 34c8307c
......@@ -474,7 +474,9 @@ commandParseArgs command global args =
-- reverse the flags here as we want to process the flags left to right
-- but data flow in function compsition is right to left.
accum flags = foldr (flip (.)) id [ f | Right f <- flags ]
unrecognised opts = [ "unrecognized option `" ++ opt ++ "'\n"
unrecognised opts = [ "unrecognized "
++ "'" ++ (commandName command) ++ "'"
++ " option `" ++ opt ++ "'\n"
| opt <- opts ]
-- For unrecognised global flags we put them in the position just after
-- the command, if there is one. This gives us a chance to parse them
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment