pub fn shell_quote(path: &str) -> StringExpand description
POSIX-shell-quote a path for inclusion in a copy-pasteable command.
Returns the bare path when it’s a safe identifier; otherwise wraps it
in single quotes (escaping any embedded single quote via the standard
'\'' trick). Keeps the common case (cd /tmp/scratch) clean while
staying correct for spaces, parens, $, etc.