Compare commits
14 Commits
grep-0.4.0
...
grep-searc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
86e0ab12ef | ||
|
|
7189950799 | ||
|
|
0b0e013f5a | ||
|
|
cac9870a02 | ||
|
|
bee13375ed | ||
|
|
f5be160839 | ||
|
|
24e88dc15b | ||
|
|
5748f81bb1 | ||
|
|
d47663b1b4 | ||
|
|
38d630261a | ||
|
|
b3dc4b0998 | ||
|
|
f09b55b8e7 | ||
|
|
0551c6b931 | ||
|
|
3a612f88b8 |
20
CHANGELOG.md
20
CHANGELOG.md
@@ -1,3 +1,21 @@
|
||||
15.1.0
|
||||
======
|
||||
This is a small release that fixes a bug with how ripgrep handles line
|
||||
buffering. This might manifest as ripgrep printing output later than you
|
||||
expect or not working correctly with `tail -f` (even if you're using the
|
||||
`--line-buffered` flag).
|
||||
|
||||
Bug fixes:
|
||||
|
||||
* [BUG #3194](https://github.com/BurntSushi/ripgrep/issues/3194):
|
||||
Fix a regression with `--line-buffered` introduced in ripgrep 15.0.0.
|
||||
|
||||
Feature enhancements:
|
||||
|
||||
* [FEATURE #3192](https://github.com/BurntSushi/ripgrep/pull/3192):
|
||||
Add hyperlink alias for Cursor.
|
||||
|
||||
|
||||
15.0.0 (2025-10-15)
|
||||
===================
|
||||
ripgrep 15 is a new major version release of ripgrep that mostly has bug fixes,
|
||||
@@ -32,8 +50,6 @@ Performance improvements:
|
||||
Don't resolve helper binaries on Windows when `-z/--search-zip` isn't used.
|
||||
* [PERF #2865](https://github.com/BurntSushi/ripgrep/pull/2865):
|
||||
Avoid using path canonicalization on Windows when emitting hyperlinks.
|
||||
* [PERF #3184](https://github.com/BurntSushi/ripgrep/pull/3184):
|
||||
Improve performance of large values with `-A/--after-context`.
|
||||
|
||||
Bug fixes:
|
||||
|
||||
|
||||
26
Cargo.lock
generated
26
Cargo.lock
generated
@@ -144,7 +144,7 @@ checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280"
|
||||
|
||||
[[package]]
|
||||
name = "globset"
|
||||
version = "0.4.17"
|
||||
version = "0.4.18"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"arbitrary",
|
||||
@@ -227,7 +227,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "grep-searcher"
|
||||
version = "0.1.15"
|
||||
version = "0.1.16"
|
||||
dependencies = [
|
||||
"bstr",
|
||||
"encoding_rs",
|
||||
@@ -298,9 +298,9 @@ checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273"
|
||||
|
||||
[[package]]
|
||||
name = "memmap2"
|
||||
version = "0.9.8"
|
||||
version = "0.9.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "843a98750cd611cc2965a8213b53b43e715f13c37a9e096c6408e69990961db7"
|
||||
checksum = "744133e4a0e0a658e1374cf3bf8e415c4052a15a111acd372764c55b4177d490"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
@@ -388,7 +388,7 @@ checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58"
|
||||
|
||||
[[package]]
|
||||
name = "ripgrep"
|
||||
version = "14.1.1"
|
||||
version = "15.0.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bstr",
|
||||
@@ -470,9 +470,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.106"
|
||||
version = "2.0.107"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6"
|
||||
checksum = "2a26dbd934e5451d21ef060c018dae56fc073894c5a7896f882928a76e6d081b"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -496,9 +496,9 @@ checksum = "c13547615a44dc9c452a8a534638acdf07120d4b6847c8178705da06306a3057"
|
||||
|
||||
[[package]]
|
||||
name = "tikv-jemalloc-sys"
|
||||
version = "0.6.0+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7"
|
||||
version = "0.6.1+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cd3c60906412afa9c2b5b5a48ca6a5abe5736aec9eb48ad05037a677e52e4e2d"
|
||||
checksum = "cd8aa5b2ab86a2cefa406d889139c162cbb230092f7d1d7cbc1716405d852a3b"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
@@ -506,9 +506,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tikv-jemallocator"
|
||||
version = "0.6.0"
|
||||
version = "0.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4cec5ff18518d81584f477e9bfdf957f5bb0979b0bac3af4ca30b5b3ae2d2865"
|
||||
checksum = "0359b4327f954e0567e69fb191cf1436617748813819c94b8cd4a431422d053a"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"tikv-jemalloc-sys",
|
||||
@@ -516,9 +516,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "unicode-ident"
|
||||
version = "1.0.19"
|
||||
version = "1.0.20"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d"
|
||||
checksum = "462eeb75aeb73aea900253ce739c8e18a67423fadf006037cd3ff27e82748a06"
|
||||
|
||||
[[package]]
|
||||
name = "walkdir"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "ripgrep"
|
||||
version = "14.1.1" #:version
|
||||
version = "15.0.0" #:version
|
||||
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
||||
description = """
|
||||
ripgrep is a line-oriented search tool that recursively searches the current
|
||||
|
||||
@@ -15,7 +15,7 @@ edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
bstr = { version = "1.6.2", features = ["std"] }
|
||||
globset = { version = "0.4.17", path = "../globset" }
|
||||
globset = { version = "0.4.18", path = "../globset" }
|
||||
log = "0.4.20"
|
||||
termcolor = "1.3.0"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH RG 1 2025-10-15 "!!VERSION!!" "User Commands"
|
||||
.TH RG 1 2025-10-22 "!!VERSION!!" "User Commands"
|
||||
.
|
||||
.
|
||||
.SH NAME
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "globset"
|
||||
version = "0.4.17" #:version
|
||||
version = "0.4.18" #:version
|
||||
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
||||
description = """
|
||||
Cross platform single glob and glob set matching. Glob set matching is the
|
||||
|
||||
@@ -503,7 +503,11 @@ impl GlobSet {
|
||||
required_exts.add(i, ext, p.regex().to_owned());
|
||||
}
|
||||
MatchStrategy::Regex => {
|
||||
debug!("glob converted to regex: {:?}", p);
|
||||
debug!(
|
||||
"glob `{:?}` converted to regex: `{:?}`",
|
||||
p,
|
||||
p.regex()
|
||||
);
|
||||
regexes.add(i, p.regex().to_owned());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ bench = false
|
||||
|
||||
[dependencies]
|
||||
crossbeam-deque = "0.8.3"
|
||||
globset = { version = "0.4.17", path = "../globset" }
|
||||
globset = { version = "0.4.18", path = "../globset" }
|
||||
log = "0.4.20"
|
||||
memchr = "2.6.3"
|
||||
same-file = "1.0.6"
|
||||
|
||||
@@ -274,6 +274,7 @@ pub(crate) const DEFAULT_TYPES: &[(&[&str], &[&str])] = &[
|
||||
(&["spark"], &["*.spark"]),
|
||||
(&["spec"], &["*.spec"]),
|
||||
(&["sql"], &["*.sql", "*.psql"]),
|
||||
(&["ssa"], &["*.ssa"]),
|
||||
(&["stylus"], &["*.styl"]),
|
||||
(&["sv"], &["*.v", "*.vg", "*.sv", "*.svh", "*.h"]),
|
||||
(&["svelte"], &["*.svelte", "*.svelte.ts"]),
|
||||
|
||||
@@ -35,7 +35,7 @@ grep-regex = { version = "0.1.14", path = "../regex" }
|
||||
all-features = true
|
||||
# This opts into a nightly unstable option to show the features that need to be
|
||||
# enabled for public API items. To do that, we set 'docsrs', and when that's
|
||||
# enabled, we enable the 'doc_auto_cfg' feature.
|
||||
# enabled, we enable the 'doc_cfg' feature.
|
||||
#
|
||||
# To test this locally, run:
|
||||
#
|
||||
|
||||
@@ -4,6 +4,11 @@ use crate::hyperlink::HyperlinkAlias;
|
||||
///
|
||||
/// These need to be sorted by name.
|
||||
pub(super) const HYPERLINK_PATTERN_ALIASES: &[HyperlinkAlias] = &[
|
||||
alias(
|
||||
"cursor",
|
||||
"Cursor scheme (cursor://)",
|
||||
"cursor://file{path}:{line}:{column}",
|
||||
),
|
||||
prioritized_alias(
|
||||
0,
|
||||
"default",
|
||||
|
||||
@@ -58,7 +58,7 @@ assert_eq!(output, expected);
|
||||
*/
|
||||
|
||||
#![deny(missing_docs)]
|
||||
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
|
||||
pub use crate::{
|
||||
color::{ColorError, ColorSpecs, UserColorSpec, default_color_specs},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "grep-searcher"
|
||||
version = "0.1.15" #:version
|
||||
version = "0.1.16" #:version
|
||||
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
||||
description = """
|
||||
Fast line oriented regex searching as a library.
|
||||
|
||||
@@ -415,26 +415,21 @@ impl LineBuffer {
|
||||
assert_eq!(self.pos, 0);
|
||||
loop {
|
||||
self.ensure_capacity()?;
|
||||
let oldend = self.end;
|
||||
while !self.free_buffer().is_empty() {
|
||||
let readlen = rdr.read(self.free_buffer())?;
|
||||
if readlen == 0 {
|
||||
break;
|
||||
}
|
||||
self.end += readlen;
|
||||
let readlen = rdr.read(self.free_buffer().as_bytes_mut())?;
|
||||
if readlen == 0 {
|
||||
// We're only done reading for good once the caller has
|
||||
// consumed everything.
|
||||
self.last_lineterm = self.end;
|
||||
return Ok(!self.buffer().is_empty());
|
||||
}
|
||||
|
||||
// Get a mutable view into the bytes we've just read. These are
|
||||
// the bytes that we do binary detection on, and also the bytes we
|
||||
// search to find the last line terminator. We need a mutable slice
|
||||
// in the case of binary conversion.
|
||||
let oldend = self.end;
|
||||
self.end += readlen;
|
||||
let newbytes = &mut self.buf[oldend..self.end];
|
||||
if newbytes.is_empty() {
|
||||
self.last_lineterm = self.end;
|
||||
// We're only done reading for good once the caller has
|
||||
// consumed everything.
|
||||
return Ok(!self.buffer().is_empty());
|
||||
}
|
||||
|
||||
// Binary detection.
|
||||
match self.config.binary {
|
||||
|
||||
@@ -737,7 +737,7 @@ d
|
||||
// Namely, it will *always* detect binary data in the current buffer
|
||||
// before searching it. Thus, the total number of bytes searched is
|
||||
// smaller than below.
|
||||
let exp = "0:a\n\nbyte count:262142\nbinary offset:262153\n";
|
||||
let exp = "0:a\n\nbyte count:262146\nbinary offset:262153\n";
|
||||
// In contrast, the slice readers (for multi line as well) will only
|
||||
// look for binary data in the initial chunk of bytes. After that
|
||||
// point, it only looks for binary data in matches. Note though that
|
||||
@@ -771,7 +771,7 @@ d
|
||||
haystack.push_str("a\x00a\n");
|
||||
haystack.push_str("a\n");
|
||||
|
||||
let exp = "0:a\n\nbyte count:262142\nbinary offset:262149\n";
|
||||
let exp = "0:a\n\nbyte count:262146\nbinary offset:262149\n";
|
||||
// The binary offset for the Slice readers corresponds to the binary
|
||||
// data in `a\x00a\n` since the first line with binary data
|
||||
// (`b\x00b\n`) isn't part of a match, and is therefore undetected.
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
class RipgrepBin < Formula
|
||||
version '14.1.1'
|
||||
version '15.0.0'
|
||||
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 "fc87e78f7cb3fea12d69072e7ef3b21509754717b746368fd40d88963630e2b3"
|
||||
sha256 "44128c733d127ddbda461e01225a68b5f9997cfe7635242a797f645ca674a71a"
|
||||
elsif OS.linux?
|
||||
url "https://github.com/BurntSushi/ripgrep/releases/download/#{version}/ripgrep-#{version}-x86_64-unknown-linux-musl.tar.gz"
|
||||
sha256 "4cf9f2741e6c465ffdb7c26f38056a59e2a2544b51f7cc128ef28337eeae4d8e"
|
||||
sha256 "253ad0fd5fef0d64cba56c70dccdacc1916d4ed70ad057cc525fcdb0c3bbd2a7"
|
||||
end
|
||||
|
||||
conflicts_with "ripgrep"
|
||||
|
||||
Reference in New Issue
Block a user