mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-07-27 18:21:57 -07:00
Compare commits
5 Commits
grep-print
...
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
|
||||
[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
|
||||
|
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "ignore"
|
||||
version = "0.4.7" #:version
|
||||
version = "0.4.8" #:version
|
||||
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
||||
description = """
|
||||
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"]),
|
||||
("r", &["*.R", "*.r", "*.Rmd", "*.Rnw"]),
|
||||
("rdoc", &["*.rdoc"]),
|
||||
("robot", &["*.robot"]),
|
||||
("rst", &["*.rst"]),
|
||||
("ruby", &["Gemfile", "*.gemspec", ".irbrc", "Rakefile", "*.rb"]),
|
||||
("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(
|
||||
depth: usize,
|
||||
pb: PathBuf,
|
||||
@@ -416,6 +427,17 @@ impl DirEntryRaw {
|
||||
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.
|
||||
|
@@ -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.
|
||||
|
||||
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
|
||||
line. To replace the entire line, you should match the entire line.
|
||||
|
Reference in New Issue
Block a user