mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-08-04 14:12:06 -07:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
67ad9917ad | ||
|
daa157b5f9 | ||
|
ca5e294ad6 |
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)
|
||||
===================
|
||||
This is a patch release with a few small bug fixes.
|
||||
|
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -411,7 +411,7 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
|
||||
|
||||
[[package]]
|
||||
name = "ripgrep"
|
||||
version = "14.0.2"
|
||||
version = "14.0.3"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bstr",
|
||||
|
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "ripgrep"
|
||||
version = "14.0.2" #:version
|
||||
version = "14.0.3" #:version
|
||||
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
||||
description = """
|
||||
ripgrep is a line-oriented search tool that recursively searches the current
|
||||
|
@@ -771,7 +771,13 @@ impl HiArgs {
|
||||
let Some(ref sort) = self.sort else { return Box::new(haystacks) };
|
||||
let mut with_timestamps: Vec<_> = match sort.kind {
|
||||
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 => {
|
||||
attach_timestamps(haystacks, |md| md.modified()).collect()
|
||||
}
|
||||
|
@@ -1,14 +1,14 @@
|
||||
class RipgrepBin < Formula
|
||||
version '14.0.1'
|
||||
version '14.0.2'
|
||||
desc "Recursively search directories for a regex pattern."
|
||||
homepage "https://github.com/BurntSushi/ripgrep"
|
||||
|
||||
if OS.mac?
|
||||
url "https://github.com/BurntSushi/ripgrep/releases/download/#{version}/ripgrep-#{version}-x86_64-apple-darwin.tar.gz"
|
||||
sha256 "927f3f02929ded0bae21e8a93283b5466c8807b38cea94a96bbec0acc6a22786"
|
||||
sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
elsif OS.linux?
|
||||
url "https://github.com/BurntSushi/ripgrep/releases/download/#{version}/ripgrep-#{version}-x86_64-unknown-linux-musl.tar.gz"
|
||||
sha256 "e0ca32aabfc3426c00201301fd258c7da2b18431af4edac715c56da5e4326538"
|
||||
sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
end
|
||||
|
||||
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());
|
||||
});
|
||||
|
||||
// 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
|
||||
rgtest!(f275_pathsep, |dir: Dir, mut cmd: TestCommand| {
|
||||
dir.create_dir("foo");
|
||||
|
Reference in New Issue
Block a user