Live data from Hacker News

Ripgrep 14 Released

github.com

21–30 of 73 posts

Re: Ripgrep 14 Released

#21
post #15

The notes state that the headline feature is "hyperlink support". However, the notes don't seem to really explain what that means. Can someone explain a bit more about what that feature does/is? What's a use case?

So, when you search for "foo" in mydir/, rg can find the term foo inside different places in a number of files, and then print the results like: mydir/myfile.java 15: return foo; 78: System.out.println(foo); 123: // TODO: change foo to bar Hyperlink support means that the line numbers (15, 78, 123) are clickable, and will open your favorite editor to that file and that line number. That's if your terminal supports hy…

For the single file case, if you pass --with-filename then it should work.

Re: Ripgrep 14 Released

#22

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

En garde! If you're a Vim user, fzf.vim [1] can do this. :)

[1]: https://github.com/junegunn/fzf.vim

Re: Ripgrep 14 Released

#24
post #22

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

En garde! If you're a Vim user, fzf.vim [1] can do this. :) [1]: https://github.com/junegunn/fzf.vim

And if you want interactive support, try https://github.com/bombela/fzf.vim.rgfd

(shameless plug)

Re: Ripgrep 14 Released

#25
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.

https://github.com/facebookincubator/fastmod is also great for the replace usecase.

Re: Ripgrep 14 Released

#26
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.

I'll throw in sd as a nice sed/find-and-replace tool. Using fd + xargs + sd is a pretty good workflow if a shell glob isn't good enough to target the files you want. https://github.com/chmln/sd

I’ll also throw in Leah Neukirche ‘s xe as a better alternative to xargs: https://github.com/leahneukirchen/xe

Re: Ripgrep 14 Released

#27

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 Emacs. A NVMe PCIe 4.0 SSD (I'm using a WD SN850X which someone here recommended to me when I assembled my PC) is that fast and ripgrep too.

Re: Ripgrep 14 Released

#29
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.

I'll throw in sd as a nice sed/find-and-replace tool. Using fd + xargs + sd is a pretty good workflow if a shell glob isn't good enough to target the files you want. https://github.com/chmln/sd

I wanted to like sd but it doesn't support my main use case of recursive search/replace. Imagine if every time you wanted to grep some files you had to build a find -print0 | xargs | rg pipeline... it just takes me out of the flow too much. I'm glad people are posting other options here, I'm looking forward to trying them.

https://github.com/chmln/sd/issues/62

Post reply on HN