Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
171–180 of 198 posts
Re: Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
#172What are the reasons for grep not being replaced/improved? This topic seems a bit old by now.
Honestly: I rely on my shell scripts working and any "grep replacement" has to work with all the old crusty shell scripts out there, likely including ones that use odd "quirks" and GNU options. If you want to innovate in this space, why sign up for all that? Invent a better wheel, and if people like it, they'll migrate over time. I remember using ag in the old days, and I use rg now. But there's things rg does by def…
> so I go back to old fashioned grep
If you do `rg -uuu` then it should search the same stuff grep will. Not sure if that's what you meant though.
Re: Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
#173[1]: https://github.com/minad/consult#grep-and-find [2]: https://lambdaland.org/posts/2023-05-31_warp_factor_refactor...
Re: Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
#174One thing I wish ripgrep had is support for AND conditions.
I wanted and boolean syntax mixed with fzf instant search. It’s not as fast as ripgrep of course but it’s not solving the same problem.
Re: Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
#175Earlier quoted context omitted.
I wrote a bash version of this: function frg { result=`rg --ignore-case --color=always --line-number --no-heading "$@" | fzf --ansi \ --color 'hl:-1:underline,hl+:-1:underline:reverse' \ --delimiter ':' \ --preview "bat --color=always {1} --theme='Solarized (light)' --highlight-line {2}" \ --preview-window 'up,60%,border-bottom,+{2}+3/3,~3'` file="${result%%:*}" linenumber=`echo "${result}" | cut -d: -f2` if [ ! -z "…
I've never really seen PowerShell beyond minimal commands, but after seeing the parent, I definitely think it has the superior syntax of the shells. Especially for scripts.
I generally don't like MS software, but their commitment to back compatibility is worth calling out.
Re: Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
#176Earlier quoted context omitted.
> It also just doesn't feel like a quality product. On my work Windows laptop, Powershell will sometimes not quite bother flushing after it starts, so I get the banner text and then.. That’s independent of the shell, and is I believe a bug in the terminal emulator. There is an open source Windows Terminal you can separately install and that is so much better.
Nope, windows terminal definitely does this too. Just last week I was trying to install WSL, and thought it had frozen at 20% and was trying to figure out what went wrong ... turns out it had already booted but powershell had stopped flushing output.
Re: Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
#177Earlier quoted context omitted.
I've never really seen PowerShell beyond minimal commands, but after seeing the parent, I definitely think it has the superior syntax of the shells. Especially for scripts.
I expected to like Powershell when I began working somewhere with a lot of Windows (after decades of mostly Linux). I figured on paper this sounds like it has learned many important lessons that Unix shells could learn but (at least the popular ones) didn't, it's been given a blank canvas, the principles it's working to make sense, it has good people behind it. So I even undertook to write a modest new piece of glue…
YMMV (and obviously does). I think that powershell is night and day better than bash (etc) as a programming language.
Re: Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
#178Earlier quoted context omitted.
I expected to like Powershell when I began working somewhere with a lot of Windows (after decades of mostly Linux). I figured on paper this sounds like it has learned many important lessons that Unix shells could learn but (at least the popular ones) didn't, it's been given a blank canvas, the principles it's working to make sense, it has good people behind it. So I even undertook to write a modest new piece of glue…
I find the built-in commands rough. "curl https://jrock.us " to see if my website is up used to involve opening Internet Explorer to accept some sort of agreement. Now it just flashes the terminal, moves the cursor to the far right hand side of the screen, and blinks for a while. I like the Linux version of curl better...
Re: Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
#179Re: Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
#180I use ripgrep with the Emacs packages project.el (comes out of the box) and dumb-jump (needs to be installed). This may not be the most popular way of using rg but I have been very pleased with the overall experience. All it takes is running package-install to install the dumb-jump package and configuring the following hook: (add-hook 'xref-backend-functions #'dumb-jump-xref-activate) The Xref key sequences and comma…