This commit is contained in:
atagen 2026-03-23 15:06:49 +11:00
parent 76656231be
commit adea668355
6 changed files with 76 additions and 27 deletions

View file

@ -59,7 +59,7 @@ type param = Mandatory of string | Optional of string
type entry = { switch : switch; param : param option; desc : string }
type subcommand = { name : string; desc : string }
type positional = { pos_name : string; optional : bool; variadic : bool }
type help_result = { entries : entry list; subcommands : subcommand list; positionals : positional list }
type help_result = { entries : entry list; subcommands : subcommand list; positionals : positional list; description : string }
(* --- Low-level combinators --- *)
@ -313,7 +313,7 @@ let help_parser =
) []
|> List.rev_map snd
in
{ entries; subcommands; positionals = [] })
{ entries; subcommands; positionals = []; description = "" })
let skip_command_prefix s =
let len = String.length s in