Add basic gitignore functionality

No support for wildcards and exact matches might screw up nested
directories. The Globbing functionality seems like its going to be a
pain to properly match up.
This commit is contained in:
Cameron Cordes
2020-05-20 15:38:26 -04:00
parent ee3e61b76d
commit 1229c05d8d
4 changed files with 60 additions and 9 deletions

View File

@@ -12,9 +12,9 @@ pub struct ColorPrinter<'a> {
pub file_match: &'a FileMatch,
}
struct SimplePrinter<'a> {
config: &'a Config,
file_match: &'a FileMatch,
pub struct SimplePrinter<'a> {
pub config: &'a Config,
pub file_match: &'a FileMatch,
}
impl<'a> Printer for SimplePrinter<'a> {
@@ -71,6 +71,7 @@ impl<'a> Printer for ColorPrinter<'a> {
};
let mut term = term::stdout().unwrap();
term.fg(term::color::YELLOW).unwrap();
term.attr(term::Attr::Bold).unwrap();
simple_printer.print_file_name();