Skip to main content

split_command_words

Function split_command_words 

Source
pub fn split_command_words(command: &str) -> Vec<String>
Expand description

Split a simple command string into its words, respecting quotes and applying POSIX quote removal to each word. Operators are ignored, so this is meant for simple commands (the virtual-command dispatch path). Mirrors the JS parser’s per-argument quote removal so echo label:'help wanted' yields ["echo", "label:help wanted"] rather than splitting inside the quotes.