Skip to main content

parse_command

Function parse_command 

Source
pub fn parse_command(command: &str) -> ParsedCommand
Expand description

Parse a command string into structured components with arguments in source order.

This is a schema-free parse. Flags are identified syntactically (tokens starting with -). --flag=value splits into name and value; all other flags are treated as value-less. Without knowing a command’s flag definitions, --flag value is ambiguous — the value appears as a separate positional argument.