Skip to content

Commit

Permalink
Document command groups
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <[email protected]>
  • Loading branch information
rgrinberg committed Dec 2, 2020
1 parent 4cf5f02 commit bb517f7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/cmdliner.mli
Original file line number Diff line number Diff line change
Expand Up @@ -388,13 +388,23 @@ module Term : sig
type 'a node =
| Term of 'a term
| Group of 'a t list
(** The type for an individual command or a command group.
{ul
{- [Term], individual command term.}
{- [Group], a list of command terms in the same group.}} *)

and 'a t = 'a node * info
(** An individual command or a command group annotated with an [info] *)

val eval :
?help:Format.formatter -> ?err:Format.formatter -> ?catch:bool ->
?env:(string -> string option) -> ?argv:string array ->
'a term * info -> 'a t list -> 'a result
(** [eval help err catch argv (t, i) choices] is like {!eval_choice}
except that it will search for term inside the command group [choices]
If a command group is selected without a sub command, the program will
exit with an error message. *)
end with type 'a term := 'a t

val eval_peek_opts :
Expand Down

0 comments on commit bb517f7

Please sign in to comment.