/// Display the directory name, but change to "current directory" when necessary.
Display the directory name, but change to "current directory" when necessary.
Display the directory name but change to " current directory " when necessary .
pub fn nice_directory_display(os_str: impl AsRef<OsStr>) -> String {
    let text = to_utf(os_str);
    if text == "." {
        "current directory".to_string()
    } else {
        format!("'{}'", text)
    }
}
pub fn nice_directory_display ( os_str : impl AsRef < OsStr > ) -> String { let text = to_utf ( os_str ) ; if text == " " { " " . to_string ( ) } else { format ! ( " " text ) } }
Display the directory name, but change to "current directory" when necessary.
Display the directory name but change to " current directory " when necessary .
os_str
impl AsRef<OsStr>