pub fn shorten_path(path: &Path, cwd: &Path) -> String
Render a path compactly: relative to cwd when inside it, otherwise ~- abbreviated when inside the home dir.
cwd
~