pub fn is_safe_command(command: &str) -> boolExpand description
Check if a command is considered safe for auto-approval.
Performs shell-aware parsing:
- Rejects commands containing dangerous shell constructs (
$(...), backticks) - Splits on shell operators (
&&,||,;,|) and checks every segment - For each segment, strips leading env vars (
KEY=val) and path prefixes (/usr/bin/git) - Matches the normalized command against
SAFE_COMMANDSusing prefix matching