1/// A very simple colorized `cat` clone, using `bat` as a library.
2/// See `src/bin/bat` for the full `bat` application.
4 config::{Config, InputFile, StyleComponent, StyleComponents},
5 Controller, HighlightingAssets,
11 let files = std::env::args_os().skip(1).collect::<Vec<_>>();
14 eprintln!("No input files specified");
19 term_width: Term::stdout().size().1 as usize,
22 style_components: StyleComponents::new(&[
23 StyleComponent::Header,
25 StyleComponent::Numbers,
27 files: files.iter().map(|file| InputFile::Ordinary(file)).collect(),
30 let assets = HighlightingAssets::from_binary();
32 Controller::new(&config, &assets).run().expect("no errors");
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list