diff options
author | ptzz <ponca707@gmail.com> | 2018-01-29 22:06:05 +0100 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2018-01-29 16:06:05 -0500 |
commit | 3cb4d1337e9846c0518e3e2dfc4f7b007b16a288 (patch) | |
tree | e5626201bd0dbedd0c4dd03f2847982032bf359a /src | |
parent | 8514d4fbb45265c263c982d5107216eefb2017dc (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/args.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/args.rs b/src/args.rs index d2d0232b..56dacc97 100644 --- a/src/args.rs +++ b/src/args.rs @@ -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 { |