mirror of
https://github.com/sharkdp/bat.git
synced 2025-08-09 15:55:10 +02:00
Separate inputs from config
This commit is contained in:
@ -4,14 +4,16 @@ use bat::{PrettyPrinter, StyleComponent, StyleComponents};
|
||||
use console::Term;
|
||||
|
||||
fn main() {
|
||||
PrettyPrinter::new()
|
||||
let mut printer = PrettyPrinter::new();
|
||||
|
||||
printer
|
||||
.term_width(Term::stdout().size().1 as usize)
|
||||
.style_components(StyleComponents::new(&[
|
||||
StyleComponent::Header,
|
||||
StyleComponent::Grid,
|
||||
StyleComponent::Numbers,
|
||||
]))
|
||||
.files(std::env::args_os().skip(1))
|
||||
.run()
|
||||
.expect("no errors");
|
||||
.files(std::env::args_os().skip(1));
|
||||
|
||||
printer.run().expect("no errors");
|
||||
}
|
||||
|
Reference in New Issue
Block a user