Comment by Night_Thastus

Comment by Night_Thastus 7 hours ago

6 replies

Ripgrep has saved me so, so much time over the years. It's become an invaluable tool, something I install the moment I start up a new system. It's essential for navigating older codebases.

My only complaint is there are a couple of characters that the -F (treat as literal) option seems to still treat as a special character needing some kind of escape - though I don't remember which ones now.

Always glad to see it keep updating!

burntsushi 7 hours ago

> My only complaint is there are a couple of characters that the -F (treat as literal) option seems to still treat as a special character needing some kind of escape - though I don't remember which ones now.

If you have an example, I can try to explain for that specific case. But `-F/--fixed-strings` will 100% turn off any regex features in the pattern and instead will be treated as a simple literal. Where you might still need escaping is if your shell requires it.

  • cormacrelf an hour ago

    How about -F -regexthatlookslikeaflag? Verbatim, that errors out as the command line parsing tries to interpret it as a flag. If you don’t have -F, then you can escape the leading hyphen with a backslash in a single quoted string: '\-regex…', but then you don’t get fixed string search. And -F '\-regex…' is a fixed string search for “backslash hyphen r e g e x”. The only way is to manually escape the regex and not use -F.

    I think maybe a syntax like -F=-regex would work.

    • burntsushi an hour ago

      Yeah, that's a good call out. You would need `rg -F -e -pattern`.

  • kator 2 hours ago

    ripgrep has saved me so much time, I also use it now with LLMs and remind them they have ripgrep available! I added a donation on github, thanks for all your work.

  • echelon 6 hours ago

    Totally off-topic: what are the selling points of `jiff` vs chrono, time, std::time, etc.?

    Totally love your work! We've been sponsoring for awhile even though it isn't much. Thank you for all you do!