We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 738304f commit fae17a2Copy full SHA for fae17a2
CHANGELOG.md
@@ -19,6 +19,7 @@
19
20
## `bat` as a library
21
22
+- Allow crates using `bat` as a library to configure `show_nonprintable` with `PrettyPrinter`, see #2142
23
24
# v0.20.0
25
src/pretty_printer.rs
@@ -164,6 +164,12 @@ impl<'a> PrettyPrinter<'a> {
164
self
165
}
166
167
+ /// Whether to print binary content or nonprintable characters (default: no)
168
+ pub fn show_nonprintable(&mut self, yes: bool) -> &mut Self {
169
+ self.config.show_nonprintable = yes;
170
+ self
171
+ }
172
+
173
/// Whether to show "snip" markers between visible line ranges (default: no)
174
pub fn snip(&mut self, yes: bool) -> &mut Self {
175
self.active_style_components.snip = yes;
0 commit comments