Skip to main content

shell_quote

Function shell_quote 

Source
pub fn shell_quote(path: &Path) -> String
Expand description

A path as a shell word that stands for exactly that path. Plain names are written as they are; names with other printable characters go in single quotes, with each single quote written '\''; names with a control character or a byte that is not UTF-8 use the $'...' form, which shells of the Bash family read byte for byte and which keeps a terminal escape sequence from being printed raw.

In TS you’d write (pseudocode):

function shellQuote(path: string): string;