CmdMatches struct

Successful parse of one command.

String values point at argv or at default literals. child owns the parse of the selected subcommand. Release the whole tree with args_matches_free.

Public variables

const ProgramCmd* command
Schema parsed into this node.
const ProgramCmd* subcommand
Selected direct subcommand, or NULL when none was chosen.
struct CmdMatches* child
Parse of the selected subcommand, or NULL.
ArgMatch* items
Match for each argument, or NULL when empty.
size_t n_items
Length of items.

Variable documentation

const ProgramCmd* CmdMatches::command

Schema parsed into this node.

Not owned.

size_t CmdMatches::n_items

Length of items.

Equal to the schema's n_args.