pub fn extract_command_prefix(command: &str) -> StringExpand description
Extract a command prefix for auto-approval patterns.
For multi-word tools (e.g. cargo test, git status), returns the
first two tokens. For single-word tools (e.g. eslint), returns one.
Strips leading env var assignments and path prefixes.