mirror of
https://github.com/sharkdp/bat.git
synced 2025-08-09 15:55:10 +02:00
Simplify style_components
This commit is contained in:
@ -1,16 +1,16 @@
|
||||
/// A very simple colorized `cat` clone, using `bat` as a library.
|
||||
/// See `src/bin/bat` for the full `bat` application.
|
||||
use bat::{PrettyPrinter, StyleComponent, StyleComponents};
|
||||
use bat::{PrettyPrinter, StyleComponent};
|
||||
use console::Term;
|
||||
|
||||
fn main() {
|
||||
PrettyPrinter::new()
|
||||
.term_width(Term::stdout().size().1 as usize)
|
||||
.style_components(StyleComponents::new(&[
|
||||
.style_components(&[
|
||||
StyleComponent::Header,
|
||||
StyleComponent::Grid,
|
||||
StyleComponent::Numbers,
|
||||
]))
|
||||
])
|
||||
.input_files(std::env::args_os().skip(1))
|
||||
.print()
|
||||
.expect("no errors");
|
||||
|
Reference in New Issue
Block a user