Skip to main content

shell_quote

Function shell_quote 

Source
pub fn shell_quote(s: &str) -> String
Expand description

A path quoted for a POSIX shell.

use majordomus_cli::worktree::uncommitted::shell_quote;
assert_eq!(shell_quote("/a b/c"), "'/a b/c'");
assert_eq!(shell_quote("it's"), r"'it'\''s'");