pub fn shorten_path(path: &str) -> String
Shorten a file path by replacing the home directory prefix with ~.
~