bat/examples/cat.rs

14 lines
352 B
Rust
Raw Normal View History

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