Live data from Hacker News

Ripgrep 14 Released

github.com

61–70 of 73 posts

Re: Ripgrep 14 Released

#61
post #50

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!

What does « hyperlink support » mean? The release notes don’t give details, except that it’s supported.

Re: Ripgrep 14 Released

#62

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. Recently a colleague had a bug. He told me it was related to the "X" that was weirdly behaving like a "Y". I fd'd "X" and then rg'd the resulting files for "Y" and found a place where some copy/pasted code was treating "X" as a "Y". Big monorepo codebase, absolutely just tore through i…

Since Visual Studio Code is using ripgrep for search one can also open the repo in the editor and use find in files to search for such things similar performance. It’s one of my favorite tools for searching specific expressions in codebases.

I always just find it faster to put a command argument together tbh

Re: Ripgrep 14 Released

#63
post #8

rg is great, I use it a lot. Recently I have also used [ambr]( https://github.com/dalance/amber ) 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.

See also ast-grep

https://github.com/ast-grep/ast-grep/

> ast-grep is a AST-based tool to search code by pattern code. Think it as your old-friend grep but it matches AST nodes instead of text. You can write patterns as if you are writing ordinary code. It will match all code that has the same syntactical structure. You can use $ sign + upper case letters as wildcard, e.g. $MATCH, to match any single AST node. Think it as REGEX dot ., except it is not textual.

Re: Ripgrep 14 Released

#64
post #61
post #50

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!

What does « hyperlink support » mean? The release notes don’t give details, except that it’s supported.

You have one explanation here: https://wezfurlong.org/wezterm/hyperlinks.html#explicit-hype...

Re: Ripgrep 14 Released

#66

Earlier quoted context omitted.

If you haven't discovered recursive path expansion with `**` yet, which is supported by a number of popular shells, including bash, it is about to improve your shell life.

How does that work?

It's glob and/or bsd_glob from the underlying C stdlib. Another interesting example of things the stdlib glob can do:

  #!/usr/bin/perl
  # perl since it's an easy way to use an arbitrary function from stdlib
  use File::Glob "bsd_glob";
  for (bsd_glob("{Hello,Hi} {world,everyone}...a {demo,example}")) {
    print($_."\n");
  }

Re: Ripgrep 14 Released

#67

If you are an Emacs user like me, you must 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! [1]: https://github.com/minad/consult

And for those who are also on Emacs but on the Swiper/avy/ivy/counsel side of the fence, there's counsel-rg . I use it since before burntsushi (who's here on HN btw)'s ripgrep was shipped with Debian stable! > search your whole project with ripgrep and get a live preview of every matching candidate all inside of Emacs I'm sometimes searching not just my project but my entire user dir or my entire shared drive, from E…

> Swiper/avy/ivy/counsel

What are these? They're not editors/IDEs.. or?

Re: Ripgrep 14 Released

#68

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.

Thanks for the pointer - I was unaware of:

https://ss64.com/osx/mdfind.html

Re: Ripgrep 14 Released

#70
post #61

Earlier quoted context omitted.

What does « hyperlink support » mean? The release notes don’t give details, except that it’s supported.

You have one explanation here: https://wezfurlong.org/wezterm/hyperlinks.html#explicit-hype...

Thanks! I didn’t realize there was an escape sequence for hyperlinks
Post reply on HN