Skip to main content

first_positional

Function first_positional 

Source
pub fn first_positional(cmd: &Command, tokens: &[&str]) -> Option<String>
Expand description

The first positional operand the tokens name for cmd, when they carry one before any grammar failure: options and their values are skipped through the command model’s own spelling, so an option’s value is never mistaken for the operand. Recognized-mode usage envelopes use it to name the file the caller supplied (proposal §11: source keeps the path).