Skip to main content

windows_path_words

Function windows_path_words 

Source
fn windows_path_words(line: &str) -> Option<Vec<String>>
Expand description

The words of a line whose program is a Windows path, or None for any other line. The CLI joins a server’s command and arguments with spaces and puts a word it finds unsafe (a path with a backslash is one) in single quotes, so 'C:\tools\my server.exe' --port 1 is three words. A quoted part is taken as written, '\'' inside single quotes is a quote, and a backslash is never an escape: it is the path’s own. A line whose quotes don’t pair is split at its spaces alone.