beyondgrep / ack3

ack is a grep-like search tool optimized for source code.
https://beyondgrep.com/
Other
684 stars 66 forks source link

Feature suggestion: accept and ignore `-E` and `--extended-regexp` flags for `grep` compatibilty #345

Open markstos opened 2 years ago

markstos commented 2 years ago

I have to switch back and forth between ack on my latop and lots of services that only have grep. Compatibility with grep is a valued feature.

So it would be welcome of ack accepted the -E and --extended-regexp flags and ignored them (while possibly issuing a warning that they don't anything). Since ack has regex's enabled by default, essentially the -E flag is "working" by just ignoring it.

Thanks!

petdance commented 2 years ago

Is this just for your fingers, or are you writing scripts that use -E and you'd like ack -E to work?

If it's just your fingers, then is --extended-regexp actually something that gets used?

markstos commented 2 years ago

Hi Andy!

It's just for my fingers, and I never type --extended-regexp. My brain thinks "Oh, I want to use the pipe symbol, I better add -E".

markstos commented 2 years ago

BTW, I tried ag and rg and ran into problems. ack works great!

I ran into a bug with ag where it missed a 100 matches and it wasn't clear why (!!). https://github.com/ggreer/the_silver_searcher/issues/553#issuecomment-597188381

Maybe the problem with Ripgrep was that compiling with PCRE was optional, so that I couldn't actually rely on Perl regex's to work reliably with it.