diff --git a/cmdliner/Cmdliner/Cmd/index.html b/cmdliner/Cmdliner/Cmd/index.html index f8630b67..b5abf74e 100644 --- a/cmdliner/Cmdliner/Cmd/index.html +++ b/cmdliner/Cmdliner/Cmd/index.html @@ -42,14 +42,22 @@ ?argv:string array -> ?term_err:Exit.code -> (Exit.code, string) result t -> - Exit.code
eval_result' cmd is:
c if cmd evaluates to Ok c.Exit.some_error if cmd evaluates to Error msg. In this case msg is printed on err.See eval_value for other arguments.
This interface gives more information on command evaluation results and lets you choose how to map evaluation results to exit codes.
type 'a eval_ok = [ | `Ok of 'aThe term of the command evaluated to this value.
*)| `VersionThe version of the main cmd was requested.
*)| `HelpHelp was requested.
*) ]The type for successful evaluation results.
type eval_error = [ | `ParseA parse error occurred.
*)| `TermA term evaluation error occurred.
*)| `ExnAn uncaught exception occurred.
*) ]The type for erroring evaluation results.
val eval_value :
+ Exit.codeeval_result' cmd is:
c if cmd evaluates to Ok c.Exit.some_error if cmd evaluates to Error msg. In this case msg is printed on err.See eval_value for other arguments.
This interface gives more information on command evaluation results and lets you choose how to map evaluation results to exit codes.
type 'a eval_ok = [ | `Ok of 'aThe term of the command evaluated to this value.
*)| `VersionThe version of the main cmd was requested.
*)| `HelpHelp was requested.
*) ]The type for successful evaluation results.
type eval_error = [ | `ParseA parse error occurred.
*)| `TermA term evaluation error occurred.
*)| `ExnAn uncaught exception occurred.
*) ]The type for erroring evaluation results.
type 'a eval_exit = [ | `Ok of 'aThe term of the command evaluated to this value.
*)| `Exit of Exit.codeThe evaluation wants to exit with this code.
*) ]val eval_value :
?help:Stdlib.Format.formatter ->
?err:Stdlib.Format.formatter ->
?catch:bool ->
?env:(string -> string option) ->
?argv:string array ->
'a t ->
- ('a eval_ok, eval_error) resulteval ~help ~err ~catch ~env ~argv cmd is the evaluation result of cmd with:
argv the command line arguments to parse (defaults to Sys.argv)env the function used for environment variable lookup (defaults to Sys.getenv).catch if true (default) uncaught exceptions are intercepted and their stack trace is written to the err formatterhelp is the formatter used to print help or version messages (defaults to Format.std_formatter)err is the formatter used to print error messages (defaults to Format.err_formatter).val eval_peek_opts :
+ ('a eval_ok, eval_error) resulteval ~help ~err ~catch ~env ~argv cmd is the evaluation result of cmd with:
argv the command line arguments to parse (defaults to Sys.argv)env the function used for environment variable lookup (defaults to Sys.getenv).catch if true (default) uncaught exceptions are intercepted and their stack trace is written to the err formatterhelp is the formatter used to print help or version messages (defaults to Format.std_formatter)err is the formatter used to print error messages (defaults to Format.err_formatter).val eval_value' :
+ ?help:Stdlib.Format.formatter ->
+ ?err:Stdlib.Format.formatter ->
+ ?catch:bool ->
+ ?env:(string -> string option) ->
+ ?argv:string array ->
+ ?term_err:int ->
+ 'a t ->
+ 'a eval_exiteval_value' is like eval_value, but if the command term does not evaluate, returns an exit code like the evaluation function do (which can be Exit.ok in case help or version was requested).
val eval_peek_opts :
?version_opt:bool ->
?env:(string -> string option) ->
?argv:string array ->
diff --git a/cmdliner/Cmdliner/Term/Syntax/index.html b/cmdliner/Cmdliner/Term/Syntax/index.html
new file mode 100644
index 00000000..bbc19aa0
--- /dev/null
+++ b/cmdliner/Cmdliner/Term/Syntax/index.html
@@ -0,0 +1,2 @@
+
+Syntax (cmdliner.Cmdliner.Term.Syntax) Module Term.Syntax
let operators.
diff --git a/cmdliner/Cmdliner/Term/index.html b/cmdliner/Cmdliner/Term/index.html
index a68d5a09..271fc7bf 100644
--- a/cmdliner/Cmdliner/Term/index.html
+++ b/cmdliner/Cmdliner/Term/index.html
@@ -1,5 +1,5 @@
-Term (cmdliner.Cmdliner.Term) Module Cmdliner.Term
Terms.
A term is evaluated by a program to produce a result, which can be turned into an exit status. A term made of terms referring to command line arguments implicitly defines a command line syntax.
Terms
val const : 'a -> 'a tconst v is a term that evaluates to v.
f $ v is a term that evaluates to the result of applying the evaluation of v to the one of f.
Interacting with Cmdliner's evaluation
term_result ~usage t evaluates to
`Ok v if t evaluates to Ok v`Error `Term with the error message e and usage shown according to usage (defaults to false), if t evaluates to Error (`Msg e).
See also term_result'.
term_result' is like term_result but with a string error case.
cli_parse_result t is a term that evaluates to:
`Ok v if t evaluates to Ok v.`Error `Parse with the error message e if t evaluates to Error (`Msg e).
See also cli_parse_result'.
cli_parse_result' is like cli_parse_result but with a string error case.
val main_name : string tmain_name is a term that evaluates to the main command name; that is the name of the tool.
val choice_names : string list tchoice_names is a term that evaluates to the names of the commands that are children of the main command.
with_used_args t is a term that evaluates to t tupled with the arguments from the command line that where used to evaluate t.
The type for command return values. See ret.
ret v is a term whose evaluation depends on the case to which v evaluates. With :
`Ok v, it evaluates to v.`Error (usage, e), the evaluation fails and Cmdliner prints the error e and the term's usage if usage is true.`Help (format, name), the evaluation fails and Cmdliner prints a manpage in format format. If name is None this is the the main command's manpage. If name is Some c this is the man page of the sub command c of the main command.
Note. While not deprecated you are encouraged not use this API.
Deprecated Term evaluation interface
This interface is deprecated in favor of Cmdliner.Cmd. Follow the compiler deprecation warning hints to transition.
Term information
Term information defines the name and man page of a term. For simple evaluation this is the name of the program and its man page. For multiple term evaluation, this is the name of a command and its man page.
val exit_info : ?docs:string -> ?doc:string -> ?max:int -> int -> exit_infoexit_info ~docs ~doc min ~max describe the range of exit statuses from min to max (defaults to min). doc is the man page information for the statuses, defaults to "undocumented". docs is the title of the man page section in which the statuses will be listed, it defaults to Manpage.s_exit_status.
In doc the documentation markup language can be used with following variables:
$(status), the value of min.$(status_max), the value of max.- The variables mentioned in
info
val default_exits : exit_info listdefault_exits is information for exit status exit_status_success added to default_error_exits.
val default_error_exits : exit_info listdefault_error_exits is information for exit statuses exit_status_cli_error and exit_status_internal_error.
val env_info : ?docs:string -> ?doc:string -> string -> env_infoenv_info ~docs ~doc var describes an environment variable var. doc is the man page information of the environment variable, defaults to "undocumented". docs is the title of the man page section in which the environment variable will be listed, it defaults to Cmdliner.Manpage.s_environment.
In doc the documentation markup language can be used with following variables:
$(env), the value of var.- The variables mentioned in
info
val info :
+Term (cmdliner.Cmdliner.Term) Module Cmdliner.Term
Terms.
A term is evaluated by a program to produce a result, which can be turned into an exit status. A term made of terms referring to command line arguments implicitly defines a command line syntax.
Terms
val const : 'a -> 'a tconst v is a term that evaluates to v.
f $ v is a term that evaluates to the result of applying the evaluation of v to the one of f.
module Syntax : sig ... endlet operators.
Interacting with Cmdliner's evaluation
term_result ~usage t evaluates to
`Ok v if t evaluates to Ok v`Error `Term with the error message e and usage shown according to usage (defaults to false), if t evaluates to Error (`Msg e).
See also term_result'.
term_result' is like term_result but with a string error case.
cli_parse_result t is a term that evaluates to:
`Ok v if t evaluates to Ok v.`Error `Parse with the error message e if t evaluates to Error (`Msg e).
See also cli_parse_result'.
cli_parse_result' is like cli_parse_result but with a string error case.
val main_name : string tmain_name is a term that evaluates to the main command name; that is the name of the tool.
val choice_names : string list tchoice_names is a term that evaluates to the names of the commands that are children of the main command.
with_used_args t is a term that evaluates to t tupled with the arguments from the command line that where used to evaluate t.
The type for command return values. See ret.
ret v is a term whose evaluation depends on the case to which v evaluates. With :
`Ok v, it evaluates to v.`Error (usage, e), the evaluation fails and Cmdliner prints the error e and the term's usage if usage is true.`Help (format, name), the evaluation fails and Cmdliner prints a manpage in format format. If name is None this is the the main command's manpage. If name is Some c this is the man page of the sub command c of the main command.
Note. While not deprecated you are encouraged not use this API.
Deprecated Term evaluation interface
This interface is deprecated in favor of Cmdliner.Cmd. Follow the compiler deprecation warning hints to transition.
Term information
Term information defines the name and man page of a term. For simple evaluation this is the name of the program and its man page. For multiple term evaluation, this is the name of a command and its man page.
val exit_info : ?docs:string -> ?doc:string -> ?max:int -> int -> exit_infoexit_info ~docs ~doc min ~max describe the range of exit statuses from min to max (defaults to min). doc is the man page information for the statuses, defaults to "undocumented". docs is the title of the man page section in which the statuses will be listed, it defaults to Manpage.s_exit_status.
In doc the documentation markup language can be used with following variables:
$(status), the value of min.$(status_max), the value of max.- The variables mentioned in
info
val default_exits : exit_info listdefault_exits is information for exit status exit_status_success added to default_error_exits.
val default_error_exits : exit_info listdefault_error_exits is information for exit statuses exit_status_cli_error and exit_status_internal_error.
val env_info : ?docs:string -> ?doc:string -> string -> env_infoenv_info ~docs ~doc var describes an environment variable var. doc is the man page information of the environment variable, defaults to "undocumented". docs is the title of the man page section in which the environment variable will be listed, it defaults to Cmdliner.Manpage.s_environment.
In doc the documentation markup language can be used with following variables:
$(env), the value of var.- The variables mentioned in
info
val info :
?man_xrefs:Manpage.xref list ->
?man:Manpage.block list ->
?envs:env_info list ->
diff --git a/cmdliner/_doc-dir/CHANGES.md b/cmdliner/_doc-dir/CHANGES.md
index 67d7f8e7..36968f93 100755
--- a/cmdliner/_doc-dir/CHANGES.md
+++ b/cmdliner/_doc-dir/CHANGES.md
@@ -1,3 +1,17 @@
+v1.3.0 2024-05-23 La Forclaz (VS)
+---------------------------------
+
+- Add let operators in `Cmdliner.Term.Syntax` (#173). Thanks to Benoit
+ Montagu for suggesting, Gabriel Scherer for reminding us of language
+ punning obscurities and Sebastien Mondet for strengthening the case
+ to add them.
+- Pager. Support full path command lookups on Windows.
+ (#185). Thanks to @kit-ty-kate for the report.
+- In manpage specifications use `$(iname)` in the default
+ introduction of the `ENVIRONMENT` section. Follow up to
+ #168.
+- Add `Cmd.eval_value'` a variation on `Cmd.eval_value`.
+
v1.2.0 2023-04-10 La Forclaz (VS)
---------------------------------
diff --git a/cmdliner/_doc-dir/README.md b/cmdliner/_doc-dir/README.md
index 6e5ff4c1..c7d0a804 100755
--- a/cmdliner/_doc-dir/README.md
+++ b/cmdliner/_doc-dir/README.md
@@ -1,6 +1,6 @@
Cmdliner — Declarative definition of command line interfaces for OCaml
-------------------------------------------------------------------------------
-v1.2.0
+v1.3.0
Cmdliner allows the declarative definition of command line interfaces
for OCaml.
diff --git a/cmdliner/_doc-dir/odoc-pages/examples.mld b/cmdliner/_doc-dir/odoc-pages/examples.mld
index 8ac88212..a437b9ce 100755
--- a/cmdliner/_doc-dir/odoc-pages/examples.mld
+++ b/cmdliner/_doc-dir/odoc-pages/examples.mld
@@ -79,7 +79,7 @@ let cmd =
`S Manpage.s_bugs; `P "Report bugs to .";
`S Manpage.s_see_also; `P "$(b,rmdir)(1), $(b,unlink)(2)" ]
in
- let info = Cmd.info "rm" ~version:"v1.2.0" ~doc ~man in
+ let info = Cmd.info "rm" ~version:"v1.3.0" ~doc ~man in
Cmd.v info Term.(const rm $ prompt $ recursive $ files)
let main () = exit (Cmd.eval cmd)
@@ -149,7 +149,7 @@ let cmd =
[ `S Manpage.s_bugs;
`P "Email them to ."; ]
in
- let info = Cmd.info "cp" ~version:"v1.2.0" ~doc ~man ~man_xrefs in
+ let info = Cmd.info "cp" ~version:"v1.3.0" ~doc ~man ~man_xrefs in
Cmd.v info Term.(ret (const cp $ verbose $ recurse $ force $ srcs $ dest))
@@ -258,7 +258,7 @@ let cmd =
`S Manpage.s_see_also;
`P "$(b,cat)(1), $(b,head)(1)" ]
in
- let info = Cmd.info "tail" ~version:"v1.2.0" ~doc ~man in
+ let info = Cmd.info "tail" ~version:"v1.3.0" ~doc ~man in
Cmd.v info Term.(const tail $ lines $ follow $ verb $ pid $ files)
@@ -435,7 +435,7 @@ let help_cmd =
let main_cmd =
let doc = "a revision control system" in
let man = help_secs in
- let info = Cmd.info "darcs" ~version:"v1.2.0" ~doc ~sdocs ~man in
+ let info = Cmd.info "darcs" ~version:"v1.3.0" ~doc ~sdocs ~man in
let default = Term.(ret (const (fun _ -> `Help (`Pager, None)) $ copts_t)) in
Cmd.group info ~default [initialize_cmd; record_cmd; help_cmd]
diff --git a/cmdliner/_doc-dir/odoc-pages/index.mld b/cmdliner/_doc-dir/odoc-pages/index.mld
index 962dd49f..db93924d 100755
--- a/cmdliner/_doc-dir/odoc-pages/index.mld
+++ b/cmdliner/_doc-dir/odoc-pages/index.mld
@@ -1,4 +1,4 @@
-{0 Cmdliner {%html: v1.2.0%}}
+{0 Cmdliner {%html: v1.3.0%}}
[Cmdliner] provides a simple and compositional mechanism
to convert command line arguments to OCaml values and pass them to
diff --git a/cmdliner/examples.html b/cmdliner/examples.html
index a5900cde..ce6bf176 100644
--- a/cmdliner/examples.html
+++ b/cmdliner/examples.html
@@ -52,7 +52,7 @@ let cmd =
`S Manpage.s_bugs; `P "Report bugs to <bugs@example.org>.";
`S Manpage.s_see_also; `P "$(b,rmdir)(1), $(b,unlink)(2)" ]
in
- let info = Cmd.info "rm" ~version:"v1.2.0" ~doc ~man in
+ let info = Cmd.info "rm" ~version:"v1.3.0" ~doc ~man in
Cmd.v info Term.(const rm $ prompt $ recursive $ files)
let main () = exit (Cmd.eval cmd)
@@ -101,7 +101,7 @@ let cmd =
[ `S Manpage.s_bugs;
`P "Email them to <bugs@example.org>."; ]
in
- let info = Cmd.info "cp" ~version:"v1.2.0" ~doc ~man ~man_xrefs in
+ let info = Cmd.info "cp" ~version:"v1.3.0" ~doc ~man ~man_xrefs in
Cmd.v info Term.(ret (const cp $ verbose $ recurse $ force $ srcs $ dest))
@@ -183,7 +183,7 @@ let cmd =
`S Manpage.s_see_also;
`P "$(b,cat)(1), $(b,head)(1)" ]
in
- let info = Cmd.info "tail" ~version:"v1.2.0" ~doc ~man in
+ let info = Cmd.info "tail" ~version:"v1.3.0" ~doc ~man in
Cmd.v info Term.(const tail $ lines $ follow $ verb $ pid $ files)
@@ -330,7 +330,7 @@ let help_cmd =
let main_cmd =
let doc = "a revision control system" in
let man = help_secs in
- let info = Cmd.info "darcs" ~version:"v1.2.0" ~doc ~sdocs ~man in
+ let info = Cmd.info "darcs" ~version:"v1.3.0" ~doc ~sdocs ~man in
let default = Term.(ret (const (fun _ -> `Help (`Pager, None)) $ copts_t)) in
Cmd.group info ~default [initialize_cmd; record_cmd; help_cmd]
diff --git a/ppx_yojson_conv_lib/_doc-dir/LICENSE.md b/ppx_yojson_conv_lib/_doc-dir/LICENSE.md
index f45a250e..55cdc790 100644
--- a/ppx_yojson_conv_lib/_doc-dir/LICENSE.md
+++ b/ppx_yojson_conv_lib/_doc-dir/LICENSE.md
@@ -1,6 +1,6 @@
The MIT License
-Copyright (c) 2019--2023 Jane Street Group, LLC
+Copyright (c) 2019--2024 Jane Street Group, LLC
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal