discover_subcommand_hierarchy

Function discover_subcommand_hierarchy 

Source
pub async fn discover_subcommand_hierarchy(
    program: &str,
    config: &ProbeConfig,
    max_depth: usize,
) -> Result<Vec<SubcommandSpec>>
Expand description

Recursively discover subcommand hierarchy by probing each subcommand.

This function probes each subcommand to discover:

  • Subcommand-specific options
  • Subcommand-specific arguments
  • Nested subcommands

ยงArguments

  • program - The command to probe
  • config - Configuration for probing
  • max_depth - Maximum depth to recurse (prevents infinite loops)