diff --git a/Formula/r/ripgrep.rb b/Formula/r/ripgrep.rb index 6f5013985e9c8..b5b5ac108caa6 100644 --- a/Formula/r/ripgrep.rb +++ b/Formula/r/ripgrep.rb @@ -1,8 +1,8 @@ class Ripgrep < Formula desc "Search tool like grep and The Silver Searcher" homepage "https://github.com/BurntSushi/ripgrep" - url "https://github.com/BurntSushi/ripgrep/archive/refs/tags/13.0.0.tar.gz" - sha256 "0fb17aaf285b3eee8ddab17b833af1e190d73de317ff9648751ab0660d763ed2" + url "https://github.com/BurntSushi/ripgrep/archive/refs/tags/14.0.0.tar.gz" + sha256 "d4a57f558abe30bb272850d08850d412870fb3f942ed06932a30b4989911360b" license "Unlicense" head "https://github.com/BurntSushi/ripgrep.git", branch: "master" @@ -33,13 +33,8 @@ class Ripgrep < Formula def install system "cargo", "install", "--features", "pcre2", *std_cargo_args - # Completion scripts and manpage are generated in the crate's build - # directory, which includes a fingerprint hash. Try to locate it first - out_dir = Dir["target/release/build/ripgrep-*/out"].first - man1.install "#{out_dir}/rg.1" - bash_completion.install "#{out_dir}/rg.bash" - fish_completion.install "#{out_dir}/rg.fish" - zsh_completion.install "complete/_rg" + generate_completions_from_executable(bin/"rg", "--generate", shell_parameter_format: "complete-") + (man1/"rg.1").write Utils.safe_popen_read(bin/"rg", "--generate", "man") end test do