1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-09-06 13:22:23 +01:00

Add option --binary

`--binary` allows to specify how to deal with binary content. Current
options are not printing anything or treating the binary data as text.
This commit is contained in:
einfachIrgendwer0815
2024-05-31 18:20:16 +02:00
parent b662fec214
commit 7f089ead62
8 changed files with 63 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
use crate::line_range::{HighlightedLineRanges, LineRanges};
use crate::nonprintable_notation::NonprintableNotation;
use crate::nonprintable_notation::{BinaryBehavior, NonprintableNotation};
#[cfg(feature = "paging")]
use crate::paging::PagingMode;
use crate::style::StyleComponents;
@@ -44,6 +44,9 @@ pub struct Config<'a> {
/// The configured notation for non-printable characters
pub nonprintable_notation: NonprintableNotation,
/// How to treat binary content
pub binary: BinaryBehavior,
/// The character width of the terminal
pub term_width: usize,