ignore: support custom file names

This commit adds support for ignore files with custom names. This
allows for application specific ignorefile names, e.g. using
`.fdignore` for `fd`.

See also: https://github.com/BurntSushi/ripgrep/issues/673

See also: https://github.com/sharkdp/fd/issues/156
This commit is contained in:
ptzz
2018-01-29 22:06:05 +01:00
committed by Andrew Gallant
parent 8514d4fbb4
commit 3cb4d1337e
3 changed files with 134 additions and 13 deletions

View File

@@ -288,6 +288,9 @@ impl Args {
wd.git_ignore(!self.no_ignore && !self.no_ignore_vcs);
wd.git_exclude(!self.no_ignore && !self.no_ignore_vcs);
wd.ignore(!self.no_ignore);
if !self.no_ignore {
wd.add_custom_ignore_filename(".rgignore");
}
wd.parents(!self.no_ignore_parent);
wd.threads(self.threads());
if self.sort_files {