mirror of
https://github.com/sharkdp/bat.git
synced 2025-01-31 10:11:07 +00:00
Paint STDOUT bold, unify writeln statement
This commit is contained in:
parent
7e2e0c82ac
commit
438f3df345
@ -51,14 +51,12 @@ impl<'a> Printer<'a> {
|
|||||||
self.colors.grid.paint("│"),
|
self.colors.grid.paint("│"),
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
match filename {
|
writeln!(
|
||||||
None => {
|
self.handle,
|
||||||
writeln!(self.handle, "STDIN",)?;
|
"{}{}",
|
||||||
}
|
filename.map_or("", |_| "File: "),
|
||||||
Some(filename) => {
|
self.colors.filename.paint(filename.unwrap_or("STDIN"))
|
||||||
writeln!(self.handle, "File {}", self.colors.filename.paint(filename))?;
|
)?;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
self.print_horizontal_line('┼')
|
self.print_horizontal_line('┼')
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user