Skip to main content

extract_command_prefix

Function extract_command_prefix 

Source
pub fn extract_command_prefix(source: &str) -> PrefixResult
Expand description

Extract the command prefix for permission rule matching.

Only returns a prefix when the source consists of a single, structurally simple command. Any injection-like construct (compound lists, pipelines, substitutions, globs, etc.) causes PrefixResult::NeedsReview.