mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-05-19 09:40:22 -07:00
ignore: add grouped toggle for standard filters
This commit is contained in:
parent
ca6bd648ab
commit
a5f82e8826
@ -571,6 +571,29 @@ impl WalkBuilder {
|
||||
self
|
||||
}
|
||||
|
||||
/// Enables all the standard ignore filters.
|
||||
///
|
||||
/// This toggles, as a group, all the filters that are enabled by default:
|
||||
///
|
||||
/// - [hidden()](#method.hidden)
|
||||
/// - [parents()](#method.parents)
|
||||
/// - [ignore()](#method.ignore)
|
||||
/// - [git_ignore()](#method.git_ignore)
|
||||
/// - [git_global()](#method.git_global)
|
||||
/// - [git_exclude()](#method.git_exclude)
|
||||
///
|
||||
/// They may still be toggled individually after calling this function.
|
||||
///
|
||||
/// This is (by definition) enabled by default.
|
||||
pub fn standard_filters(&mut self, yes: bool) -> &mut WalkBuilder {
|
||||
self.hidden(yes)
|
||||
.parents(yes)
|
||||
.ignore(yes)
|
||||
.git_ignore(yes)
|
||||
.git_global(yes)
|
||||
.git_exclude(yes)
|
||||
}
|
||||
|
||||
/// Enables ignoring hidden files.
|
||||
///
|
||||
/// This is enabled by default.
|
||||
|
Loading…
x
Reference in New Issue
Block a user