Skip to main content

tokenize

Function tokenize 

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

Tokenize a command segment into words using shlex (POSIX word splitting).

Falls back to whitespace splitting if shlex cannot parse the input (e.g. unmatched quotes). The fallback preserves quote characters in the resulting tokens.