Skip to content

Commit

Permalink
Added printing of "<BINARY>" for binary files in the interactive mode…
Browse files Browse the repository at this point in the history
… if header decorations are turned off
  • Loading branch information
Maksim Panfilov authored and sharkdp committed May 14, 2019
1 parent 0a1e08d commit f37dbb8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/printer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(());
}

Expand Down

0 comments on commit f37dbb8

Please sign in to comment.