Comment by vessenes

Comment by vessenes 10 hours ago

15 replies

rg is a first for me in that it's a CLI tool that an LLM taught me about -- it's a go-to tool for Claude and codex, and since I got most of my bash skills pre-dotcom-one-boom I'm historically just a grep user.

Anyway I'm trying to retrain the fingers these days, rg is super cool.

sshine 10 hours ago

I switched to `ack` in 2017 because it handles recursive searches better.

I didn't bother switching to `ag` when it came around because of having to retrain.

But eventually I did switch to `rg` because it just has so many conveniences.

I even switched to `fd` recently instead of `find` because it's easier and less typing for common use-cases.

I've been using the terminal since 1997, so I'm happy I can still learn new things and use improved commands.

  • ahartmetz 8 hours ago

    In my case, I am still using ag because rg doesn't seem to be better enough to switch. What's the big deal with rg vs ag?

    I had a similar thing with bash vs zsh before I learned about oh-my-zsh. Nushell also seems attractive these days... the good stuff from PowerShell in a POSIX-like shell.

    • burntsushi 8 hours ago

      ripgrep is a lot faster (which you might only notice on larger haystacks), has many fewer bugs and is maintained.

      • ahartmetz 6 hours ago

        ag is plenty fast (gigabytes in a fraction of a second) for me - I'd switch in a heartbeat if that wasn't so. Any bugs, hm, I guess I just haven't run into them. Thanks for the reply though! I realize who replied here ;)

  • dotancohen 9 hours ago

    Sell me on fd. I occasionally use find, mostly with the -name or -iname flags.

    • rkomorn 9 hours ago

      It feels nearly instant by comparison to find. That's been enough for me.

    • lawn 9 hours ago

      You don't have to type -name for the 1000th time.

      • dotancohen 2 hours ago

        Thanks.

        For other people, on Ubuntu install the `fd-find` package. The executable is named `fdfind` (no dash).

dotancohen 9 hours ago

Through I use rg to initiate searches, my muscle memory keeps using grep after pipes.

  • WJW 7 hours ago

    Huh I hadn't even realized I did that. I think grep has the "filter in pipe" spot in my head while rg has the "search recursively in all files" spot.

    • burntsushi 7 hours ago

      I did it too, even after I initially released ripgrep. At this point, I've mostly re-trained my muscle memory to use `rg` in pipelines. (Particularly because I was careful to make sure `rg` worked just like `grep` does in pipelines.)

      I also find that combining `-o/--only-matching` and `-r/--replace` has replaced many of my uses of `sed` and `awk`.

  • kstrauser 7 hours ago

    Heh, I realized the same for myself the other day. I’ve been deliberately making myself go back and change it to rg to try to replace the muscle memory.