summaryrefslogtreecommitdiffstats
path: root/examples/simple.rs
blob: 0a6b3d0dc1f62e443d5c024f18433db1a78c5a76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/// A simple program that prints its own source code using the bat library
use bat::PrettyPrinter;
use std::ffi::OsStr;

fn main() {
    let path_to_this_file = OsStr::new(file!());

    PrettyPrinter::new()
        .file(path_to_this_file)
        .run()
        .expect("no errors");
}