mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-08-02 05:02:01 -07:00
Compare commits
5 Commits
grep-searc
...
ignore-0.4
Author | SHA1 | Date | |
---|---|---|---|
|
7a6903bd4e | ||
|
9801fae29f | ||
|
abdf7140d7 | ||
|
b83e7968ef | ||
|
8ebc113847 |
@@ -224,7 +224,7 @@ $ choco install ripgrep
|
|||||||
```
|
```
|
||||||
|
|
||||||
If you're a **Windows Scoop** user, then you can install ripgrep from the
|
If you're a **Windows Scoop** user, then you can install ripgrep from the
|
||||||
[official bucket](https://github.com/lukesampson/scoop/blob/master/bucket/ripgrep.json):
|
[official bucket](https://github.com/ScoopInstaller/Main/blob/master/bucket/ripgrep.json):
|
||||||
|
|
||||||
```
|
```
|
||||||
$ scoop install ripgrep
|
$ scoop install ripgrep
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "ignore"
|
name = "ignore"
|
||||||
version = "0.4.7" #:version
|
version = "0.4.8" #:version
|
||||||
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
||||||
description = """
|
description = """
|
||||||
A fast library for efficiently matching ignore files such as `.gitignore`
|
A fast library for efficiently matching ignore files such as `.gitignore`
|
||||||
|
@@ -241,6 +241,7 @@ const DEFAULT_TYPES: &'static [(&'static str, &'static [&'static str])] = &[
|
|||||||
("readme", &["README*", "*README"]),
|
("readme", &["README*", "*README"]),
|
||||||
("r", &["*.R", "*.r", "*.Rmd", "*.Rnw"]),
|
("r", &["*.R", "*.r", "*.Rmd", "*.Rnw"]),
|
||||||
("rdoc", &["*.rdoc"]),
|
("rdoc", &["*.rdoc"]),
|
||||||
|
("robot", &["*.robot"]),
|
||||||
("rst", &["*.rst"]),
|
("rst", &["*.rst"]),
|
||||||
("ruby", &["Gemfile", "*.gemspec", ".irbrc", "Rakefile", "*.rb"]),
|
("ruby", &["Gemfile", "*.gemspec", ".irbrc", "Rakefile", "*.rb"]),
|
||||||
("rust", &["*.rs"]),
|
("rust", &["*.rs"]),
|
||||||
|
@@ -379,7 +379,18 @@ impl DirEntryRaw {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(unix))]
|
// Placeholder implementation to allow compiling on non-standard platforms (e.g. wasm32).
|
||||||
|
#[cfg(not(any(windows, unix)))]
|
||||||
|
fn from_entry_os(
|
||||||
|
depth: usize,
|
||||||
|
ent: &fs::DirEntry,
|
||||||
|
ty: fs::FileType,
|
||||||
|
) -> Result<DirEntryRaw, Error> {
|
||||||
|
Err(Error::Io(io::Error::new(
|
||||||
|
io::ErrorKind::Other, "unsupported platform")))
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(windows)]
|
||||||
fn from_path(
|
fn from_path(
|
||||||
depth: usize,
|
depth: usize,
|
||||||
pb: PathBuf,
|
pb: PathBuf,
|
||||||
@@ -416,6 +427,17 @@ impl DirEntryRaw {
|
|||||||
ino: md.ino(),
|
ino: md.ino(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Placeholder implementation to allow compiling on non-standard platforms (e.g. wasm32).
|
||||||
|
#[cfg(not(any(windows, unix)))]
|
||||||
|
fn from_path(
|
||||||
|
depth: usize,
|
||||||
|
pb: PathBuf,
|
||||||
|
link: bool,
|
||||||
|
) -> Result<DirEntryRaw, Error> {
|
||||||
|
Err(Error::Io(io::Error::new(
|
||||||
|
io::ErrorKind::Other, "unsupported platform")))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// WalkBuilder builds a recursive directory iterator.
|
/// WalkBuilder builds a recursive directory iterator.
|
||||||
|
@@ -2171,7 +2171,10 @@ Replace every match with the text given when printing results. Neither this
|
|||||||
flag nor any other ripgrep flag will modify your files.
|
flag nor any other ripgrep flag will modify your files.
|
||||||
|
|
||||||
Capture group indices (e.g., $5) and names (e.g., $foo) are supported in the
|
Capture group indices (e.g., $5) and names (e.g., $foo) are supported in the
|
||||||
replacement string.
|
replacement string. In shells such as Bash and zsh, you should wrap the
|
||||||
|
pattern in single quotes instead of double quotes. Otherwise, capture group
|
||||||
|
indices will be replaced by expanded shell variables which will most likely
|
||||||
|
be empty.
|
||||||
|
|
||||||
Note that the replacement by default replaces each match, and NOT the entire
|
Note that the replacement by default replaces each match, and NOT the entire
|
||||||
line. To replace the entire line, you should match the entire line.
|
line. To replace the entire line, you should match the entire line.
|
||||||
|
Reference in New Issue
Block a user