Skip to main content

quote

Function quote 

Source
pub fn quote(arg: &str) -> String
Expand description

Quote a value for bash the way zx does.

  • the empty string becomes $'';
  • “safe” words are returned untouched;
  • everything else is wrapped into an ANSI-C $'...' string where backslashes, single quotes and control characters are escaped.