Skip to main content

canonicalize

Function canonicalize 

Source
pub fn canonicalize(raw: &str, cwd: &str) -> CommandInvocation
Expand description

Canonicalize a raw command string. A command free of shell composition is parsed into the Program form; otherwise it is a Shell invocation that requires a shell capability. Parsing is intentionally simple and shell-free: quoting is parsed as argv syntax, while composition operators still force the Shell form. Invalid argv syntax also fails closed to the shell form and therefore requires explicit shell authority.