Skip to main content

shell_escape_value

Function shell_escape_value 

Source
pub fn shell_escape_value(value: &str) -> String
Expand description

Uses single quotes for values containing shell metacharacters ($, backtick, \, "). Single quotes within the value are escaped via '\''. Single-pass scan: returns double-quoted string when no metacharacters are present (zero intermediate allocations in the common case).