Skip to main content

flags_with_arity

Function flags_with_arity 

Source
fn flags_with_arity(args: &'static [&'static str]) -> Vec<(&'static str, bool)>
Expand description

Split an args list into (flag, takes_a_value) pairs.

Arity is read off the list itself — a flag whose next token is not another flag takes a value. That’s what lets container_argv strip --permission-prompt-tool stdio (two tokens) and --verbose (one) correctly without a hardcoded table of every provider’s flag shapes.