mirror of
https://github.com/sharkdp/bat.git
synced 2024-11-26 09:43:51 +01:00
Added printing of "<BINARY>" for binary files in the interactive mode if header decorations are turned off
This commit is contained in:
parent
0a1e08da96
commit
f37dbb80a8
@ -194,6 +194,9 @@ impl<'a> InteractivePrinter<'a> {
|
||||
impl<'a> Printer for InteractivePrinter<'a> {
|
||||
fn print_header(&mut self, handle: &mut Write, file: InputFile) -> Result<()> {
|
||||
if !self.config.output_components.header() {
|
||||
if ContentType::BINARY == self.content_type {
|
||||
writeln!(handle, "<BINARY>")?;
|
||||
}
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user