Skip to main content

find_command_position

Function find_command_position 

Source
pub fn find_command_position(words: &[String]) -> Option<usize>
Expand description

Returns the index of the first token that is the actual command being invoked, skipping leading env-var assignments (FOO=bar).

An env-var assignment is a token matching [A-Za-z_][A-Za-z0-9_]*=.*.