mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-07-27 02:01:58 -07:00
Compare commits
17 Commits
grep-print
...
grep-0.3.1
Author | SHA1 | Date | |
---|---|---|---|
|
0096c74c11 | ||
|
8c48355b03 | ||
|
f9b86de963 | ||
|
d23b74975a | ||
|
a5cbdb3dfe | ||
|
b6bac8484e | ||
|
805fa32d18 | ||
|
2d518dd1f9 | ||
|
8575d26179 | ||
|
2e81a7adfe | ||
|
cd5440fb62 | ||
|
2ee690e87a | ||
|
59f86a45d3 | ||
|
2d31af38a2 | ||
|
0da1176e7d | ||
|
eeffcd50b7 | ||
|
625743d7c8 |
12
.github/workflows/release.yml
vendored
12
.github/workflows/release.yml
vendored
@@ -332,14 +332,15 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cargo deb --profile deb --target ${{ env.TARGET }}
|
cargo deb --profile deb --target ${{ env.TARGET }}
|
||||||
version="${{ needs.create-release.outputs.version }}"
|
version="${{ needs.create-release.outputs.version }}"
|
||||||
deb="target/${{ env.TARGET }}/debian/ripgrep_$version-1_amd64.deb"
|
echo "DEB_DIR=target/${{ env.TARGET }}/debian" >> $GITHUB_ENV
|
||||||
echo "DEB=$deb" >> $GITHUB_ENV
|
echo "DEB_NAME=ripgrep_$version-1_amd64.deb" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Create sha256 sum of deb file
|
- name: Create sha256 sum of deb file
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
sum="$DEB.sha256"
|
cd "$DEB_DIR"
|
||||||
shasum -a 256 "$DEB" > "$sum"
|
sum="$DEB_NAME.sha256"
|
||||||
|
shasum -a 256 "$DEB_NAME" > "$sum"
|
||||||
echo "SUM=$sum" >> $GITHUB_ENV
|
echo "SUM=$sum" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Upload release archive
|
- name: Upload release archive
|
||||||
@@ -347,5 +348,6 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
cd "$DEB_DIR"
|
||||||
version="${{ needs.create-release.outputs.version }}"
|
version="${{ needs.create-release.outputs.version }}"
|
||||||
gh release upload "$version" ${{ env.DEB }} ${{ env.SUM }}
|
gh release upload "$version" "$DEB_NAME" "$SUM"
|
||||||
|
36
CHANGELOG.md
36
CHANGELOG.md
@@ -1,9 +1,35 @@
|
|||||||
|
14.0.2 (2023-11-27)
|
||||||
|
===================
|
||||||
|
This is a patch release with a few small bug fixes.
|
||||||
|
|
||||||
|
Bug fixes:
|
||||||
|
|
||||||
|
* [BUG #2654](https://github.com/BurntSushi/ripgrep/issues/2654):
|
||||||
|
Fix `deb` release sha256 sum file.
|
||||||
|
* [BUG #2658](https://github.com/BurntSushi/ripgrep/issues/2658):
|
||||||
|
Fix partial regression in the behavior of `--null-data --line-regexp`.
|
||||||
|
* [BUG #2659](https://github.com/BurntSushi/ripgrep/issues/2659):
|
||||||
|
Fix Fish shell completions.
|
||||||
|
* [BUG #2662](https://github.com/BurntSushi/ripgrep/issues/2662):
|
||||||
|
Fix typo in documentation for `-i/--ignore-case`.
|
||||||
|
|
||||||
|
|
||||||
|
14.0.1 (2023-11-26)
|
||||||
|
===================
|
||||||
|
This a patch release meant to fix `cargo install ripgrep` on Windows.
|
||||||
|
|
||||||
|
Bug fixes:
|
||||||
|
|
||||||
|
* [BUG #2653](https://github.com/BurntSushi/ripgrep/issues/2653):
|
||||||
|
Include `pkg/windows/Manifest.xml` in crate package.
|
||||||
|
|
||||||
|
|
||||||
14.0.0 (2023-11-26)
|
14.0.0 (2023-11-26)
|
||||||
===================
|
===================
|
||||||
ripgrep 14 is a new major version release of ripgrep that has some new
|
ripgrep 14 is a new major version release of ripgrep that has some new
|
||||||
features, performance improvements and a lot of bug fixes.
|
features, performance improvements and a lot of bug fixes.
|
||||||
|
|
||||||
The headling feature in this release is hyperlink support. In this release,
|
The headlining feature in this release is hyperlink support. In this release,
|
||||||
they are an opt-in feature but may change to an opt-out feature in the future.
|
they are an opt-in feature but may change to an opt-out feature in the future.
|
||||||
To enable them, try passing `--hyperlink-format default`. If you use [VS Code],
|
To enable them, try passing `--hyperlink-format default`. If you use [VS Code],
|
||||||
then try passing `--hyperlink-format vscode`. Please [report your experience
|
then try passing `--hyperlink-format vscode`. Please [report your experience
|
||||||
@@ -12,10 +38,10 @@ with hyperlinks][report-hyperlinks], positive or negative.
|
|||||||
[VS Code]: https://code.visualstudio.com/
|
[VS Code]: https://code.visualstudio.com/
|
||||||
[report-hyperlinks]: https://github.com/BurntSushi/ripgrep/discussions/2611
|
[report-hyperlinks]: https://github.com/BurntSushi/ripgrep/discussions/2611
|
||||||
|
|
||||||
Another headling development in this release is that it contains a rewrite of
|
Another headlining development in this release is that it contains a rewrite
|
||||||
its regex engine. You generally shouldn't notice any changes, except for some
|
of its regex engine. You generally shouldn't notice any changes, except for
|
||||||
searches may get faster. You can read more about the [regex engine rewrite on
|
some searches may get faster. You can read more about the [regex engine rewrite
|
||||||
my blog][regex-internals]. Please [report your performance improvements or
|
on my blog][regex-internals]. Please [report your performance improvements or
|
||||||
regressions that you notice][report-perf].
|
regressions that you notice][report-perf].
|
||||||
|
|
||||||
[report-perf]: https://github.com/BurntSushi/ripgrep/discussions/2652
|
[report-perf]: https://github.com/BurntSushi/ripgrep/discussions/2652
|
||||||
|
8
Cargo.lock
generated
8
Cargo.lock
generated
@@ -134,7 +134,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "grep"
|
name = "grep"
|
||||||
version = "0.2.13"
|
version = "0.3.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"grep-cli",
|
"grep-cli",
|
||||||
"grep-matcher",
|
"grep-matcher",
|
||||||
@@ -177,7 +177,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "grep-printer"
|
name = "grep-printer"
|
||||||
version = "0.2.0"
|
version = "0.2.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bstr",
|
"bstr",
|
||||||
"grep-matcher",
|
"grep-matcher",
|
||||||
@@ -202,7 +202,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "grep-searcher"
|
name = "grep-searcher"
|
||||||
version = "0.1.12"
|
version = "0.1.13"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bstr",
|
"bstr",
|
||||||
"encoding_rs",
|
"encoding_rs",
|
||||||
@@ -411,7 +411,7 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ripgrep"
|
name = "ripgrep"
|
||||||
version = "14.0.0"
|
version = "14.0.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bstr",
|
"bstr",
|
||||||
|
18
Cargo.toml
18
Cargo.toml
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "ripgrep"
|
name = "ripgrep"
|
||||||
version = "14.0.0" #:version
|
version = "14.0.1" #: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
|
||||||
@@ -17,7 +17,7 @@ exclude = [
|
|||||||
"HomebrewFormula",
|
"HomebrewFormula",
|
||||||
"/.github/",
|
"/.github/",
|
||||||
"/ci/",
|
"/ci/",
|
||||||
"/pkg/",
|
"/pkg/brew",
|
||||||
"/benchsuite/",
|
"/benchsuite/",
|
||||||
"/scripts/",
|
"/scripts/",
|
||||||
]
|
]
|
||||||
@@ -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.2.13", path = "crates/grep" }
|
grep = { version = "0.3.0", 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"
|
||||||
@@ -74,6 +74,18 @@ pcre2 = ["grep/pcre2"]
|
|||||||
[profile.release]
|
[profile.release]
|
||||||
debug = 1
|
debug = 1
|
||||||
|
|
||||||
|
[profile.release-lto]
|
||||||
|
inherits = "release"
|
||||||
|
opt-level = 3
|
||||||
|
debug = "none"
|
||||||
|
strip = "symbols"
|
||||||
|
debug-assertions = false
|
||||||
|
overflow-checks = false
|
||||||
|
lto = "fat"
|
||||||
|
panic = "abort"
|
||||||
|
incremental = false
|
||||||
|
codegen-units = 1
|
||||||
|
|
||||||
# This is the main way to strip binaries in the deb package created by
|
# This is the main way to strip binaries in the deb package created by
|
||||||
# 'cargo deb'. For other release binaries, we (currently) call 'strip'
|
# 'cargo deb'. For other release binaries, we (currently) call 'strip'
|
||||||
# explicitly in the release process.
|
# explicitly in the release process.
|
||||||
|
@@ -27,6 +27,7 @@
|
|||||||
`cargo update -p ripgrep` so that the `Cargo.lock` is updated. Commit the
|
`cargo update -p ripgrep` so that the `Cargo.lock` is updated. Commit the
|
||||||
changes and create a new signed tag. Alternatively, use
|
changes and create a new signed tag. Alternatively, use
|
||||||
`cargo-up --no-push --no-release Cargo.toml {VERSION}` to automate this.
|
`cargo-up --no-push --no-release Cargo.toml {VERSION}` to automate this.
|
||||||
|
* Run `cargo package` and ensure it succeeds.
|
||||||
* Push changes to GitHub, NOT including the tag. (But do not publish a new
|
* Push changes to GitHub, NOT including the tag. (But do not publish a new
|
||||||
version of ripgrep to crates.io yet.)
|
version of ripgrep to crates.io yet.)
|
||||||
* Once CI for `master` finishes successfully, push the version tag. (Trying to
|
* Once CI for `master` finishes successfully, push the version tag. (Trying to
|
||||||
|
@@ -35,10 +35,11 @@ pub(crate) fn generate() -> String {
|
|||||||
.replace("!DOC!", &doc),
|
.replace("!DOC!", &doc),
|
||||||
);
|
);
|
||||||
if let Some(negated) = flag.name_negated() {
|
if let Some(negated) = flag.name_negated() {
|
||||||
|
let long = format!("-l '{}'", negated.replace("'", "\\'"));
|
||||||
out.push_str(
|
out.push_str(
|
||||||
&template
|
&TEMPLATE
|
||||||
.replace("!SHORT!", "")
|
.replace("!SHORT!", "")
|
||||||
.replace("!LONG!", &negated)
|
.replace("!LONG!", &long)
|
||||||
.replace("!DOC!", &doc),
|
.replace("!DOC!", &doc),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@@ -3078,7 +3078,7 @@ Individual patterns can still be matched case sensitively by using
|
|||||||
inline regex flags. For example, \fB(?\-i)abc\fP will match \fBabc\fP
|
inline regex flags. For example, \fB(?\-i)abc\fP will match \fBabc\fP
|
||||||
case sensitively even when this flag is used.
|
case sensitively even when this flag is used.
|
||||||
.sp
|
.sp
|
||||||
This flag overrides \flag{case-sensitive} and flag{smart-case}.
|
This flag overrides \flag{case-sensitive} and \flag{smart-case}.
|
||||||
"#
|
"#
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "grep"
|
name = "grep"
|
||||||
version = "0.2.13" #: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,9 +17,9 @@ 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.12", path = "../searcher" }
|
grep-searcher = { version = "0.1.13", path = "../searcher" }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
termcolor = "1.0.4"
|
termcolor = "1.0.4"
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "grep-printer"
|
name = "grep-printer"
|
||||||
version = "0.2.0" #:version
|
version = "0.2.1" #:version
|
||||||
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
||||||
description = """
|
description = """
|
||||||
An implementation of the grep crate's Sink trait that provides standard
|
An implementation of the grep crate's Sink trait that provides standard
|
||||||
@@ -21,7 +21,7 @@ serde = ["dep:serde", "dep:serde_json"]
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
bstr = "1.6.2"
|
bstr = "1.6.2"
|
||||||
grep-matcher = { version = "0.1.7", path = "../matcher" }
|
grep-matcher = { version = "0.1.7", path = "../matcher" }
|
||||||
grep-searcher = { version = "0.1.12", path = "../searcher" }
|
grep-searcher = { version = "0.1.13", path = "../searcher" }
|
||||||
log = "0.4.5"
|
log = "0.4.5"
|
||||||
termcolor = "1.3.0"
|
termcolor = "1.3.0"
|
||||||
serde = { version = "1.0.193", optional = true }
|
serde = { version = "1.0.193", optional = true }
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "grep-searcher"
|
name = "grep-searcher"
|
||||||
version = "0.1.12" #:version
|
version = "0.1.13" #: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.
|
||||||
|
@@ -612,6 +612,17 @@ impl<'s, M: Matcher, S: Sink> Core<'s, M, S> {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if let Some(line_term) = self.matcher.line_terminator() {
|
if let Some(line_term) = self.matcher.line_terminator() {
|
||||||
|
// FIXME: This works around a bug in grep-regex where it does
|
||||||
|
// not set the line terminator of the regex itself, and thus
|
||||||
|
// line anchors like `(?m:^)` and `(?m:$)` will not match
|
||||||
|
// anything except for `\n`. So for now, we just disable the fast
|
||||||
|
// line-by-line searcher which requires the regex to be able to
|
||||||
|
// deal with line terminators correctly. The slow line-by-line
|
||||||
|
// searcher strips line terminators and thus absolves the regex
|
||||||
|
// engine from needing to care about whether they are `\n` or NUL.
|
||||||
|
if line_term.as_byte() == b'\x00' {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if line_term == self.config.line_term {
|
if line_term == self.config.line_term {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -1,14 +1,14 @@
|
|||||||
class RipgrepBin < Formula
|
class RipgrepBin < Formula
|
||||||
version '13.0.0'
|
version '14.0.1'
|
||||||
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 "585c18350cb8d4392461edd6c921e6edd5a97cbfc03b567d7bd440423e118082"
|
sha256 "927f3f02929ded0bae21e8a93283b5466c8807b38cea94a96bbec0acc6a22786"
|
||||||
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 "ee4e0751ab108b6da4f47c52da187d5177dc371f0f512a7caaec5434e711c091"
|
sha256 "e0ca32aabfc3426c00201301fd258c7da2b18431af4edac715c56da5e4326538"
|
||||||
end
|
end
|
||||||
|
|
||||||
conflicts_with "ripgrep"
|
conflicts_with "ripgrep"
|
||||||
|
@@ -1210,3 +1210,10 @@ rgtest!(r2574, |dir: Dir, mut cmd: TestCommand| {
|
|||||||
.stdout();
|
.stdout();
|
||||||
eqnice!("some.domain.com\nsome.domain.com\n", got);
|
eqnice!("some.domain.com\nsome.domain.com\n", got);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// See: https://github.com/BurntSushi/ripgrep/issues/2658
|
||||||
|
rgtest!(r2658_null_data_line_regexp, |dir: Dir, mut cmd: TestCommand| {
|
||||||
|
dir.create("haystack", "foo\0bar\0quux\0");
|
||||||
|
let got = cmd.args(&["--null-data", "--line-regexp", r"bar"]).stdout();
|
||||||
|
eqnice!("haystack:bar\0", got);
|
||||||
|
});
|
||||||
|
Reference in New Issue
Block a user