mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-08-05 22:52:02 -07:00
Compare commits
7 Commits
grep-print
...
14.0.3
Author | SHA1 | Date | |
---|---|---|---|
|
67ad9917ad | ||
|
daa157b5f9 | ||
|
ca5e294ad6 | ||
|
6c7947b819 | ||
|
9acb4a5405 | ||
|
0096c74c11 | ||
|
8c48355b03 |
10
CHANGELOG.md
10
CHANGELOG.md
@@ -1,3 +1,13 @@
|
|||||||
|
14.0.3 (2023-11-28)
|
||||||
|
===================
|
||||||
|
This is a patch release with a bug fix for the `--sortr` flag.
|
||||||
|
|
||||||
|
Bug fixes:
|
||||||
|
|
||||||
|
* [BUG #2664](https://github.com/BurntSushi/ripgrep/issues/2664):
|
||||||
|
Fix `--sortr=path`. I left a `todo!()` in the source. Oof.
|
||||||
|
|
||||||
|
|
||||||
14.0.2 (2023-11-27)
|
14.0.2 (2023-11-27)
|
||||||
===================
|
===================
|
||||||
This is a patch release with a few small bug fixes.
|
This is a patch release with a few small bug fixes.
|
||||||
|
4
Cargo.lock
generated
4
Cargo.lock
generated
@@ -134,7 +134,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "grep"
|
name = "grep"
|
||||||
version = "0.3.0"
|
version = "0.3.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"grep-cli",
|
"grep-cli",
|
||||||
"grep-matcher",
|
"grep-matcher",
|
||||||
@@ -411,7 +411,7 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ripgrep"
|
name = "ripgrep"
|
||||||
version = "14.0.1"
|
version = "14.0.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bstr",
|
"bstr",
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "ripgrep"
|
name = "ripgrep"
|
||||||
version = "14.0.1" #:version
|
version = "14.0.3" #:version
|
||||||
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
||||||
description = """
|
description = """
|
||||||
ripgrep is a line-oriented search tool that recursively searches the current
|
ripgrep is a line-oriented search tool that recursively searches the current
|
||||||
@@ -51,7 +51,7 @@ members = [
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1.0.75"
|
anyhow = "1.0.75"
|
||||||
bstr = "1.7.0"
|
bstr = "1.7.0"
|
||||||
grep = { version = "0.3.0", path = "crates/grep" }
|
grep = { version = "0.3.1", path = "crates/grep" }
|
||||||
ignore = { version = "0.4.21", path = "crates/ignore" }
|
ignore = { version = "0.4.21", path = "crates/ignore" }
|
||||||
lexopt = "0.3.0"
|
lexopt = "0.3.0"
|
||||||
log = "0.4.5"
|
log = "0.4.5"
|
||||||
|
@@ -771,7 +771,13 @@ impl HiArgs {
|
|||||||
let Some(ref sort) = self.sort else { return Box::new(haystacks) };
|
let Some(ref sort) = self.sort else { return Box::new(haystacks) };
|
||||||
let mut with_timestamps: Vec<_> = match sort.kind {
|
let mut with_timestamps: Vec<_> = match sort.kind {
|
||||||
SortModeKind::Path if !sort.reverse => return Box::new(haystacks),
|
SortModeKind::Path if !sort.reverse => return Box::new(haystacks),
|
||||||
SortModeKind::Path => todo!(),
|
SortModeKind::Path => {
|
||||||
|
let mut haystacks = haystacks.collect::<Vec<Haystack>>();
|
||||||
|
haystacks.sort_by(|ref h1, ref h2| {
|
||||||
|
h1.path().cmp(h2.path()).reverse()
|
||||||
|
});
|
||||||
|
return Box::new(haystacks.into_iter());
|
||||||
|
}
|
||||||
SortModeKind::LastModified => {
|
SortModeKind::LastModified => {
|
||||||
attach_timestamps(haystacks, |md| md.modified()).collect()
|
attach_timestamps(haystacks, |md| md.modified()).collect()
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "grep"
|
name = "grep"
|
||||||
version = "0.3.0" #:version
|
version = "0.3.1" #:version
|
||||||
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
||||||
description = """
|
description = """
|
||||||
Fast line oriented regex searching as a library.
|
Fast line oriented regex searching as a library.
|
||||||
@@ -17,7 +17,7 @@ edition = "2021"
|
|||||||
grep-cli = { version = "0.1.10", path = "../cli" }
|
grep-cli = { version = "0.1.10", path = "../cli" }
|
||||||
grep-matcher = { version = "0.1.7", path = "../matcher" }
|
grep-matcher = { version = "0.1.7", path = "../matcher" }
|
||||||
grep-pcre2 = { version = "0.1.7", path = "../pcre2", optional = true }
|
grep-pcre2 = { version = "0.1.7", path = "../pcre2", optional = true }
|
||||||
grep-printer = { version = "0.2.0", path = "../printer" }
|
grep-printer = { version = "0.2.1", path = "../printer" }
|
||||||
grep-regex = { version = "0.1.12", path = "../regex" }
|
grep-regex = { version = "0.1.12", path = "../regex" }
|
||||||
grep-searcher = { version = "0.1.13", path = "../searcher" }
|
grep-searcher = { version = "0.1.13", path = "../searcher" }
|
||||||
|
|
||||||
|
@@ -1,14 +1,14 @@
|
|||||||
class RipgrepBin < Formula
|
class RipgrepBin < Formula
|
||||||
version '14.0.1'
|
version '14.0.2'
|
||||||
desc "Recursively search directories for a regex pattern."
|
desc "Recursively search directories for a regex pattern."
|
||||||
homepage "https://github.com/BurntSushi/ripgrep"
|
homepage "https://github.com/BurntSushi/ripgrep"
|
||||||
|
|
||||||
if OS.mac?
|
if OS.mac?
|
||||||
url "https://github.com/BurntSushi/ripgrep/releases/download/#{version}/ripgrep-#{version}-x86_64-apple-darwin.tar.gz"
|
url "https://github.com/BurntSushi/ripgrep/releases/download/#{version}/ripgrep-#{version}-x86_64-apple-darwin.tar.gz"
|
||||||
sha256 "927f3f02929ded0bae21e8a93283b5466c8807b38cea94a96bbec0acc6a22786"
|
sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||||
elsif OS.linux?
|
elsif OS.linux?
|
||||||
url "https://github.com/BurntSushi/ripgrep/releases/download/#{version}/ripgrep-#{version}-x86_64-unknown-linux-musl.tar.gz"
|
url "https://github.com/BurntSushi/ripgrep/releases/download/#{version}/ripgrep-#{version}-x86_64-unknown-linux-musl.tar.gz"
|
||||||
sha256 "e0ca32aabfc3426c00201301fd258c7da2b18431af4edac715c56da5e4326538"
|
sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||||
end
|
end
|
||||||
|
|
||||||
conflicts_with "ripgrep"
|
conflicts_with "ripgrep"
|
||||||
|
@@ -356,6 +356,17 @@ rgtest!(f263_sort_files, |dir: Dir, mut cmd: TestCommand| {
|
|||||||
eqnice!(expected, cmd.arg("--sort-files").arg("test").stdout());
|
eqnice!(expected, cmd.arg("--sort-files").arg("test").stdout());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// See: https://github.com/BurntSushi/ripgrep/issues/263
|
||||||
|
rgtest!(f263_sort_files_reverse, |dir: Dir, mut cmd: TestCommand| {
|
||||||
|
dir.create("foo", "test");
|
||||||
|
dir.create("abc", "test");
|
||||||
|
dir.create("zoo", "test");
|
||||||
|
dir.create("bar", "test");
|
||||||
|
|
||||||
|
let expected = "zoo:test\nfoo:test\nbar:test\nabc:test\n";
|
||||||
|
eqnice!(expected, cmd.arg("--sortr=path").arg("test").stdout());
|
||||||
|
});
|
||||||
|
|
||||||
// See: https://github.com/BurntSushi/ripgrep/issues/275
|
// See: https://github.com/BurntSushi/ripgrep/issues/275
|
||||||
rgtest!(f275_pathsep, |dir: Dir, mut cmd: TestCommand| {
|
rgtest!(f275_pathsep, |dir: Dir, mut cmd: TestCommand| {
|
||||||
dir.create_dir("foo");
|
dir.create_dir("foo");
|
||||||
|
Reference in New Issue
Block a user