mirror of
https://github.com/sharkdp/bat.git
synced 2025-04-12 22:00:38 +01:00
`--binary` allows to specify how to deal with binary content. Current options are not printing anything or treating the binary data as text.
25 lines
594 B
Rust
25 lines
594 B
Rust
/// How to print non-printable characters with
|
|
/// [crate::config::Config::show_nonprintable]
|
|
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]
|
|
#[non_exhaustive]
|
|
pub enum NonprintableNotation {
|
|
/// Use caret notation (^G, ^J, ^@, ..)
|
|
Caret,
|
|
|
|
/// Use unicode notation (␇, ␊, ␀, ..)
|
|
#[default]
|
|
Unicode,
|
|
}
|
|
|
|
/// How to treat binary content
|
|
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]
|
|
#[non_exhaustive]
|
|
pub enum BinaryBehavior {
|
|
/// Do not print any binary content
|
|
#[default]
|
|
NoPrinting,
|
|
|
|
/// Treat binary content as normal text
|
|
AsText,
|
|
}
|