mirror of
https://github.com/sharkdp/bat.git
synced 2024-11-30 03:33:54 +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> {
|
impl<'a> Printer for InteractivePrinter<'a> {
|
||||||
fn print_header(&mut self, handle: &mut Write, file: InputFile) -> Result<()> {
|
fn print_header(&mut self, handle: &mut Write, file: InputFile) -> Result<()> {
|
||||||
if !self.config.output_components.header() {
|
if !self.config.output_components.header() {
|
||||||
|
if ContentType::BINARY == self.content_type {
|
||||||
|
writeln!(handle, "<BINARY>")?;
|
||||||
|
}
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user