Skip to main content

path_operands

Function path_operands 

Source
pub fn path_operands(command: &str) -> Option<Vec<String>>
Expand description

Every operand a command could read as a path, as written: each non-option argument of every reachable command (patterns included; they are judged as paths, which only over-reports), and the value of a --option=value. None when any cannot be determined structurally: shell expansion (variables, substitutions, globs, braces, ~ other than a leading ~/), ANSI-C quoting, an option with a path glued to it (-I/x), or a command that changes directory (cd, pushd, popd), since relative operands then resolve somewhere else.