2
0
mirror of https://github.com/sharkdp/bat synced 2024-11-08 19:10:41 +00:00
bat/examples/cat.rs

14 lines
341 B
Rust
Raw Permalink Normal View History

2020-03-21 20:45:03 +00:00
/// A very simple colorized `cat` clone, using `bat` as a library.
/// See `src/bin/bat` for the full `bat` application.
2020-04-22 19:17:59 +00:00
use bat::PrettyPrinter;
2020-03-21 20:45:03 +00:00
fn main() {
2020-04-21 19:29:47 +00:00
PrettyPrinter::new()
2020-04-22 19:17:59 +00:00
.header(true)
.grid(true)
.line_numbers(true)
2020-04-21 19:29:47 +00:00
.input_files(std::env::args_os().skip(1))
2020-04-22 18:33:19 +00:00
.print()
2020-04-22 19:46:01 +00:00
.unwrap();
2020-03-21 20:45:03 +00:00
}