Skip to main content

classify_invocation

Function classify_invocation 

Source
pub fn classify_invocation(line: &str) -> Option<Effect>
Expand description

Classify a single command-line invocation (one command, no shell connectors).

Leading VAR=val env assignments and a directory path on the program are stripped; a recognized program returns its classify_command class; an unrecognized program returns Effect::Exec (running an unknown binary is arbitrary code execution — fail safe). Returns None for a blank line or a comment (#…).