pub fn shell_quote(value: impl Display) -> String
Expand description

Quote a value for safe shell insertion.

use git_status_vars::shell_quote;
assert_eq!(shell_quote("a $b `c`\nd"), "'a $b `c`\nd'");
Examples found in repository?
src/shell_writer.rs (line 46)
45
46
47
    pub fn write_var(&self, var: impl Display, value: impl Display) {
        self.write_raw(var, shell_quote(value));
    }