1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-04-12 22:00:38 +01:00
bat/src/nonprintable_notation.rs
einfachIrgendwer0815 7f089ead62
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.
2024-08-18 10:05:37 +02:00

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,
}