Skip to main content

shorten_path

Function shorten_path 

Source
pub fn shorten_path(path: &Path, cwd: &Path) -> String
Expand description

Render a path compactly: relative to cwd when inside it, otherwise ~- abbreviated when inside the home dir.