Changing formatting

This commit is contained in:
doxterpepper 2017-11-22 00:34:07 -05:00
parent b97d5af9d4
commit ba56d4e886
1 changed files with 10 additions and 5 deletions

View File

@ -104,17 +104,22 @@ fn write_entry_uncolorized(entry: Cow<str>, separator: &'static str) -> io::Resu
// or cygwin.
// Replace back slashes with forward slashes when running on cygwin.
if let Some(_) = env::var_os("HOME") {
write!(&mut io::stdout(), "{}{}", entry.replace("\\", "/"), separator)
} else {
write!(&mut io::stdout(), "{}{}", entry, separator)
}
write!(
&mut io::stdout(),
"{}{}",
entry.replace("\\", "/"),
separator
)
} else {
write!(&mut io::stdout(), "{}{}", entry, separator)
}
}
fn print_entry_uncolorized(path: &Path, config: &FdOptions) -> io::Result<()> {
let separator = if config.null_separator { "\0" } else { "\n" };
let path_str = path.to_string_lossy();
write_entry_uncolorized(path_str, separator)
write_entry_uncolorized(path_str, separator)
}
fn get_path_style<'a>(path: &Path, ls_colors: &'a LsColors) -> Option<&'a ansi_term::Style> {