@@ -8,25 +8,25 @@ use bat::{
88 style::{OutputComponent, OutputComponents},
99 Config,
1010};
11+use console::Term;
1112use std::{collections::HashSet, io};
1213
1314fn main() -> bat::errors::Result<()> {
14− let assets = HighlightingAssets::new();
15− let mut config = Config {
16− term_width: 14, // must be greater than 13 to enable style=numbers
15+ let config = Config {
16+ term_width: Term::stdout().size().1 as usize,
1717 colored_output: true,
1818 true_color: true,
19+ theme: "1337".into(),
1920 line_ranges: LineRanges::from(vec![
2021 LineRange::from("5:7")?,
2122 LineRange::from("92:97")?,
2223 LineRange::from("15:17")?,
2324 ]),
2425 output_components: OutputComponents(with_full_decorations()),
26+ files: vec![InputFile::Ordinary("build.rs")],
2527 ..Default::default()
2628 };
27− let mut add_file = |file: &'static str| config.files.push(InputFile::Ordinary(file));
28−
29− add_file("build.rs");
29+ let assets = HighlightingAssets::new();
3030
3131 let mut output_type = OutputType::from_mode(config.paging_mode, config.pager)?;
3232 let writer = output_type.handle()?;