diff --git a/CHANGELOG.md b/CHANGELOG.md index 60438379a..9cc576ec6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +TBD +=== +Unreleased changes. Release notes have not yet been written. + + 14.1.1 (2024-09-08) =================== This is a minor release with a bug fix for a matching bug. In particular, a bug diff --git a/crates/core/flags/doc/template.rg.1 b/crates/core/flags/doc/template.rg.1 index dbbddd7dd..75e075e37 100644 --- a/crates/core/flags/doc/template.rg.1 +++ b/crates/core/flags/doc/template.rg.1 @@ -43,10 +43,10 @@ configuration file. The file can specify one shell argument per line. Lines starting with \fB#\fP are ignored. For more details, see \fBCONFIGURATION FILES\fP below. .sp -ripgrep will automatically detect if stdin exists and search stdin for a regex -pattern, e.g. \fBls | rg foo\fP. In some environments, stdin may exist when -it shouldn't. To turn off stdin detection, one can explicitly specify the -directory to search, e.g. \fBrg foo ./\fP. +ripgrep will automatically detect if stdin is a readable file and search stdin +for a regex pattern, e.g. \fBls | rg foo\fP. In some environments, stdin may +exist when it shouldn't. To turn off stdin detection, one can explicitly +specify the directory to search, e.g. \fBrg foo ./\fP. .sp Like other tools such as \fBls\fP, ripgrep will alter its output depending on whether stdout is connected to a tty. By default, when printing a tty, ripgrep diff --git a/crates/matcher/src/lib.rs b/crates/matcher/src/lib.rs index 40cbff5d9..25afb0666 100644 --- a/crates/matcher/src/lib.rs +++ b/crates/matcher/src/lib.rs @@ -389,6 +389,15 @@ pub trait Captures { /// for the overall match. fn get(&self, i: usize) -> Option; + /// Return the overall match for the capture. + /// + /// This returns the match for index `0`. That is it is equivalent to + /// `get(0).unwrap()` + #[inline] + fn as_match(&self) -> Match { + self.get(0).unwrap() + } + /// Returns true if and only if these captures are empty. This occurs /// when `len` is `0`. /// diff --git a/pkg/brew/ripgrep-bin.rb b/pkg/brew/ripgrep-bin.rb index 6f671fe57..d4dc3de31 100644 --- a/pkg/brew/ripgrep-bin.rb +++ b/pkg/brew/ripgrep-bin.rb @@ -1,14 +1,14 @@ class RipgrepBin < Formula - version '14.1.0' + version '14.1.1' 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 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + sha256 "fc87e78f7cb3fea12d69072e7ef3b21509754717b746368fd40d88963630e2b3" elsif OS.linux? url "https://github.com/BurntSushi/ripgrep/releases/download/#{version}/ripgrep-#{version}-x86_64-unknown-linux-musl.tar.gz" - sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + sha256 "4cf9f2741e6c465ffdb7c26f38056a59e2a2544b51f7cc128ef28337eeae4d8e" end conflicts_with "ripgrep"