TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ripgrep 14 Released

297 pointsby timfover 1 year ago

20 comments

akprasadover 1 year ago
Andrew sets an extremely high bar for open-source engineering. As a loose member of the broader Rust community, I&#x27;ve benefited enormously not only from his code but also from his discussion comments and his blog posts (especially [1] and [2]).<p>Congratulations on the release, Andrew! I also notice that you&#x27;ve joined Astral [3], which as a fan of Rust&#x2F;Ruff&#x2F;rg I&#x27;m thrilled about.<p>[1]: <a href="https:&#x2F;&#x2F;blog.burntsushi.net&#x2F;transducers&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;blog.burntsushi.net&#x2F;transducers&#x2F;</a><p>[2]: <a href="https:&#x2F;&#x2F;blog.burntsushi.net&#x2F;foss&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;blog.burntsushi.net&#x2F;foss&#x2F;</a><p>[3]: <a href="https:&#x2F;&#x2F;github.com&#x2F;astral-sh">https:&#x2F;&#x2F;github.com&#x2F;astral-sh</a>
评论 #38427212 未加载
insanitybitover 1 year ago
There is a distinct joy in showing someone rg who has never seen it before and then seeing them immediately adopt it as a daily tool.<p>Recently a colleague had a bug. He told me it was related to the &quot;X&quot; that was weirdly behaving like a &quot;Y&quot;.<p>I fd&#x27;d &quot;X&quot; and then rg&#x27;d the resulting files for &quot;Y&quot; and found a place where some copy&#x2F;pasted code was treating &quot;X&quot; as a &quot;Y&quot;. Big monorepo codebase, absolutely just tore through it and solved the entire bug.
评论 #38427729 未加载
评论 #38429309 未加载
ashton314over 1 year ago
If you are an Emacs user like me, you <i>must</i> try out the consult-ripgrep command from the peerless Consult [1] package by Daniel Mendler: search your whole project with ripgrep and get a live preview of every matching candidate all inside of Emacs!<p>[1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;minad&#x2F;consult">https:&#x2F;&#x2F;github.com&#x2F;minad&#x2F;consult</a>
评论 #38425630 未加载
评论 #38425406 未加载
评论 #38426550 未加载
评论 #38425332 未加载
评论 #38426122 未加载
skunkworkerover 1 year ago
Ripgrep is probably my favorite command line tool (which replaces older solutions). It’s just so quick to search a folder for a specific line of text in a file.
评论 #38425075 未加载
anotherpaulgover 1 year ago
My muscle memory is still dialed in to `ack`, but I recently built an open source tool called `grep-ast` [0] that serves a similar function to ripgrep, ack, etc. The difference is that it shows matching lines in the context of the functions&#x2F;methods&#x2F;classes&#x2F;etc that contain them.<p>It uses the abstract syntax tree (AST) of the source code to show how the matching lines fit into the code structure. It shows relevant code from every layer of the AST, above and below the matches.<p>It feels quite useful when you&#x27;re grepping to understand how functions, classes, variables etc are used within a non-trivial codebase.<p>Here&#x27;s a snippet that shows grep-ast searching the django repo. Notice that it finds `ROOT_URLCONF` and then shows you the method and class that contain the matching line, including a helpful part of the docstring. If you ran this in the terminal, it would also colorize the matches.<p><pre><code> django$ gast ROOT_URLCONF middleware&#x2F;locale.py: │from django.conf import settings │from django.conf.urls.i18n import is_language_prefix_patterns_used │from django.http import HttpResponseRedirect ⋮... │class LocaleMiddleware(MiddlewareMixin): │ &quot;&quot;&quot; │ Parse a request and decide what translation object to install in the │ current thread context. This allows pages to be dynamically translated to │ the language the user desires (if the language is available). ⋮... │ def process_request(self, request): ▶ urlconf = getattr(request, &quot;urlconf&quot;, settings.ROOT_URLCONF) </code></pre> [0] <a href="https:&#x2F;&#x2F;github.com&#x2F;paul-gauthier&#x2F;grep-ast">https:&#x2F;&#x2F;github.com&#x2F;paul-gauthier&#x2F;grep-ast</a>
评论 #38426995 未加载
评论 #38442022 未加载
grudg3over 1 year ago
rg is great, I use it a lot. Recently I have also used [ambr](<a href="https:&#x2F;&#x2F;github.com&#x2F;dalance&#x2F;amber">https:&#x2F;&#x2F;github.com&#x2F;dalance&#x2F;amber</a>) which can do both search (ambs) and replace (ambr) recursively in your codebase. The only problem as of yet is that it does not support globbing so I cannot filter on certain filetypes only.
评论 #38430408 未加载
评论 #38425246 未加载
评论 #38427410 未加载
评论 #38425517 未加载
评论 #38425337 未加载
markussssover 1 year ago
I use Ripgrep daily, and it helps me a lot when navigating codebases, and I even use it to search through my notes. A while ago, I made a script that looks for file paths in the output from Ripgrep in order to turn the paths into clickable links, as I couldn&#x27;t get it to work properly back then. I&#x27;m so happy to hear that «the headlining feature in this release is hyperlink support»! I&#x27;m really looking forward to using the new update.
goaliecaover 1 year ago
I’m not an rg wizard by any means, but it is one of the few utilities that I end up using daily for one reason or another.
lelandbateyover 1 year ago
The notes state that the headline feature is &quot;hyperlink support&quot;. However, the notes don&#x27;t seem to really explain what that means. Can someone explain a bit more about what that feature does&#x2F;is? What&#x27;s a use case?
评论 #38425293 未加载
评论 #38425338 未加载
评论 #38425264 未加载
评论 #38425260 未加载
bomewishover 1 year ago
Extra life hack for Mac users — you can use mdfind first and then pipe those results into rg with xargs. Even faster. Mdfind has an index already so the results are almost instant even across huge numbers of files. Major qol improvement.
评论 #38431537 未加载
piinbinaryover 1 year ago
I&#x27;m still sad that --sort-files makes ripgrep run in single-core mode. (I know you can&#x27;t make --sort-files _free_ in multi-core mode, but it would still be faster than single-core)<p><a href="https:&#x2F;&#x2F;github.com&#x2F;BurntSushi&#x2F;ripgrep&#x2F;issues&#x2F;152">https:&#x2F;&#x2F;github.com&#x2F;BurntSushi&#x2F;ripgrep&#x2F;issues&#x2F;152</a>
评论 #38427187 未加载
评论 #38426456 未加载
leonheldover 1 year ago
I&#x27;m very thankful for ripgrep, ag and fzf.
coldteaover 1 year ago
I don&#x27;t seem to get the hyperlinks with either Terminal or iTerm.<p>P.S. OK found it: it can&#x27;t show hyperlinks when you explicitly pass a file name to search (for internal implementation reasons, might be fixed later). It works when you search in directories etc.
ziml77over 1 year ago
Hyperlink support? Hell yes! This has been such a frustration of using terminal tools to search in files. I love that the vscode format even linkifies by matched line. Thanks for this update burntsushi!
评论 #38430035 未加载
dharmabover 1 year ago
Ripgrep is an essential tool for navigating unfamiliar codebases. I also use it to quickly search many repositories for specific symbols when I research the consumers of libraries and APIs.
tgvover 1 year ago
What&#x27;s the improvement this time? Translate DFAs to microcode?
评论 #38425268 未加载
scrameover 1 year ago
so... its grep to ack to ag to rg, is there something next?
评论 #38429799 未加载
评论 #38434022 未加载
评论 #38427493 未加载
评论 #38426469 未加载
forgotusername6over 1 year ago
The release notes use the word &quot;headling&quot; twice instead of presumably &quot;headline&quot;. I had to look it up in case this was a new usage of this archaic word.
评论 #38425990 未加载
vram22over 1 year ago
There was also ack (IIRC) written in Perl, earlier.
andrewstuartover 1 year ago
I wish Jetbrains would integrate ripgrep into Pycharm as a native feature.