Function shell_words::quote

source ยท
pub fn quote(s: &str) -> Cow<'_, str>
Expand description

Escapes special characters in a string, so that it will retain its literal meaning when used as a part of command in Unix shell.

It tries to avoid introducing any unnecessary quotes or escape characters, but specifics regarding quoting style are left unspecified.