Expand description
Argument handling for passthrough subcommands.
A command that owns its own clap subtree sets
Command::subcommand_passthrough
to true. The framework’s outer parser then captures every token after
<name> and stashes it on the App (see App::trailing_args);
the command re-parses those tokens with its own clap::Parser.
parse_passthrough is the single home for that re-parse — the argv
dance the built-in docs/update commands would otherwise hand-roll.
Because it reads App::trailing_args rather than
std::env::args_os(), a passthrough command is fully driveable from
Application::run_with_args in
tests.
Functions§
- parse_
passthrough - Parse a passthrough command’s trailing tokens into its clap
Parser.