Skip to main content

shell_tokenize

Function shell_tokenize 

Source
pub fn shell_tokenize(input: &str) -> Vec<String>
Expand description

Tokenize a shell command segment respecting single/double quotes and backslash escapes. Returns tokens with outer quotes stripped, matching how the shell would parse them. E.g. git -C "Program Files" status["git", "-C", "Program Files", "status"]