Module B0_cmdlet.Cli

Command line interaction.

val info : ?⁠man_xrefs:Cmdliner.Manpage.xref list -> ?⁠man:Cmdliner.Manpage.block list -> ?⁠envs:Cmdliner.Term.env_info list -> ?⁠exits:Cmdliner.Term.exit_info list -> ?⁠sdocs:string -> ?⁠docs:string -> ?⁠doc:string -> ?⁠version:string -> t -> Cmdliner.Term.info

info c derives a cmdliner term info for the cmdlet c. In particular it uses B0_cmdlet.name for the name and B0_cmdlet.doc c for doc. exits defaults to B00_cli.Exit.infos.

val run : ?⁠info:Cmdliner.Term.info -> t -> argv:string list -> B00_std.Os.Exit.t Cmdliner.Term.t -> B00_std.Os.Exit.t

run cmdlet ~argv t ~info is B00_cli.Exit.of_eval_result @@ Term.eval ~argv (t, info). info defaults to info c.

val run_cmds : t -> argv:string list -> (B00_std.Os.Exit.t Cmdliner.Term.t * Cmdliner.Term.info) -> (B00_std.Os.Exit.t Cmdliner.Term.t * Cmdliner.Term.info) list -> B00_std.Os.Exit.t

run_choice cmdlet ~argv main cmds is B00_cli.Exit.of_eval_result @@ Term.eval_choice ~argv main cmds