mirror of
https://github.com/sharkdp/bat
synced 2024-11-16 08:57:59 +00:00
Paint STDOUT bold, unify writeln statement
This commit is contained in:
parent
7e2e0c82ac
commit
438f3df345
1 changed files with 6 additions and 8 deletions
|
@ -51,14 +51,12 @@ impl<'a> Printer<'a> {
|
|||
self.colors.grid.paint("│"),
|
||||
)?;
|
||||
|
||||
match filename {
|
||||
None => {
|
||||
writeln!(self.handle, "STDIN",)?;
|
||||
}
|
||||
Some(filename) => {
|
||||
writeln!(self.handle, "File {}", self.colors.filename.paint(filename))?;
|
||||
}
|
||||
}
|
||||
writeln!(
|
||||
self.handle,
|
||||
"{}{}",
|
||||
filename.map_or("", |_| "File: "),
|
||||
self.colors.filename.paint(filename.unwrap_or("STDIN"))
|
||||
)?;
|
||||
|
||||
self.print_horizontal_line('┼')
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue