Skip to content
This repository has been archived by the owner on Jan 18, 2025. It is now read-only.

Integrate .ignore flag from watchexec #133

Merged
merged 2 commits into from
Nov 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ pub fn parse() -> ArgMatches<'static> {
.long("no-gitignore")
.help("Don’t use .gitignore files"),
)
.arg(
Arg::with_name("no-ignore")
.long("no-ignore")
.help("Don’t use .ignore files"),
)
.arg(
Arg::with_name("no-restart")
.long("no-restart")
Expand Down
7 changes: 7 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ pub fn set_ignores(debug: bool, builder: &mut ArgsBuilder, matches: &ArgMatches)
}

builder.no_vcs_ignore(true);
builder.no_ignore(true);
return;
}

Expand All @@ -73,6 +74,12 @@ pub fn set_ignores(debug: bool, builder: &mut ArgsBuilder, matches: &ArgMatches)
println!(">>> Load Git/VCS ignores: {:?}", !novcs);
}

let noignore = matches.is_present("no-ignore");
builder.no_ignore(noignore);
if debug {
println!(">>> Load .ignore ignores: {:?}", !noignore);
}

let mut list = vec![
// Mac
format!("*{}.DS_Store", MAIN_SEPARATOR),
Expand Down