Skip to content

Commit ac7fcd4

Browse files
committed
-h and -v are not uniform (fix #117)
1 parent 9b71426 commit ac7fcd4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

elpi_REPL.ml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ let usage =
6161
"\t-no-tc don't typecheck the program\n" ^
6262
"\t-delay-problems-outside-pattern-fragment (deprecated, for Teyjus\n" ^
6363
"\t compatibility)\n" ^
64-
"\t-version prints the version of Elpi\n" ^
64+
"\t--version prints the version of Elpi (also -v or -version)\n" ^
65+
"\t--help prints this help (also -h or -help)\n" ^
6566
API.Setup.usage ^
6667
"\nDebug options (for debugging Elpi, not your program):\n" ^
6768
"\t-print-accumulated-files prints files loaded via accumulate\n" ^
@@ -103,8 +104,8 @@ let _ =
103104
| "-no-tc" :: rest -> typecheck := false; eat_options rest
104105
| "-document-builtins" :: rest -> doc_builtins := true; eat_options rest
105106
| "-D" :: var :: rest -> vars := API.Compile.StrSet.add var !vars; eat_options rest
106-
| ("-h" | "--help") :: _ -> Printf.eprintf "%s" usage; exit 0
107-
| "-version" :: _ -> Printf.printf "%s\n" "%%VERSION_NUM%%"; exit 0
107+
| ("-h" | "--help" | "-help") :: _ -> Printf.eprintf "%s" usage; exit 0
108+
| ("-v" | "--version" | "-version") :: _ -> Printf.printf "%s\n" "%%VERSION_NUM%%"; exit 0
108109
| "--" :: rest -> rest
109110
| x :: rest -> x :: eat_options rest
110111
in

0 commit comments

Comments
 (0)