Skip to content

Commit

Permalink
Add rocq --print-version (same as coqc --print-version)
Browse files Browse the repository at this point in the history
  • Loading branch information
SkySkimmer committed Jan 14, 2025
1 parent 1c962f3 commit 3974246
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion topbin/rocq.ml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,10 @@ let print_usage fmt () =
" "^cmd^separator^doc)
subcommands
in
Printf.fprintf fmt "Usage: rocq [-debug-shim] {-v|--version|--help|SUBCOMMAND} [ARGUMENTS...]\n\
Printf.fprintf fmt "Usage: rocq [-debug-shim] {-v|--version|--print-version|--help|SUBCOMMAND} [ARGUMENTS...]\n\
\n\
\n -v, --version: print human readable version info\
\n --print-version: print machine readable version info\
Supported subcommands:\n\
%s\n\
\n\
Expand Down Expand Up @@ -107,6 +109,7 @@ let () =
match args with
(* help prints *)
| "-v" :: _ | "--version" :: _ -> Boot.Usage.version ()
| ("-print-version"|"--print-version") :: _ -> Boot.Usage.machine_readable_version ()
| ("-h" | "-H" | "-help" | "--help") :: _ ->
Printf.printf "%a%!" print_usage ();
exit 0
Expand Down

0 comments on commit 3974246

Please sign in to comment.