joyful_minigrep 0.1.3

grep but mini and colored though
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use joyful_minigrep::Config;
use std::{env, process};

fn main() {
    // Setup `term` for supporting non-ANSI terminals
    term::stdout();

    let case_sensitive = env::var("CASE_INSENSITIVE").is_err();
    let config = Config::new(env::args(), case_sensitive).unwrap_or_else(|err| {
        joyful_minigrep::print_error("Problem parsing arguments", err);
        process::exit(1);
    });

    if let Err(e) = joyful_minigrep::run(config) {
        joyful_minigrep::print_error("Application error", e);
    };
}