pub fn quote_fish(value: &str) -> StringExpand description
Quote a value for fish.
fish single quotes are not POSIX single quotes: they do process \\ and \', so
both are escaped and everything else — $, backticks, newlines — is literal.
use majordomus_cli::environment::shell::quote_fish;
assert_eq!(quote_fish("/plain/path"), "'/plain/path'");
assert_eq!(quote_fish("it's"), r"'it\'s'");
assert_eq!(quote_fish(r"back\slash"), r"'back\\slash'");
assert_eq!(quote_fish("$(whoami)"), "'$(whoami)'");