Skip to main content

pretty_io_err

Function pretty_io_err 

Source
pub fn pretty_io_err(e: &Error) -> String
Expand description

Strip Rust’s “(os error N)” suffix from an io::Error display so the message matches BSD/GNU coreutils’ output (e.g. zsh’s bundled cat/head emit cat: foo: No such file or directory, not cat: foo: No such file or directory (os error 2)). Used by all the in-process coreutils builtins.