From df98a88a1e35213e994ec583f6ad4e0d3ccac868 Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Sat, 11 May 2019 16:17:15 +0200 Subject: CoqIDE: Treat unknown arguments starting with dash as unknown options rather than files. --- ide/idetop.ml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ide/idetop.ml b/ide/idetop.ml index ce00ba6d8c..970d7cf650 100644 --- a/ide/idetop.ml +++ b/ide/idetop.ml @@ -537,7 +537,11 @@ let rec parse = function Xmlprotocol.document Xml_printer.to_string_fmt; exit 0 | "--xml_format=Ppcmds" :: rest -> msg_format := (fun () -> Xmlprotocol.Ppcmds); parse rest - | x :: rest -> x :: parse rest + | x :: rest -> + if String.length x > 0 && x.[0] = '-' then + (prerr_endline ("Unknown option " ^ x); exit 1) + else + x :: parse rest | [] -> [] let () = Usage.add_to_usage "coqidetop" -- cgit v1.2.3