ack3 icon indicating copy to clipboard operation
ack3 copied to clipboard

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

Open markstos opened this issue 4 years ago • 3 comments

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!

markstos avatar Aug 15 '21 19:08 markstos

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?

petdance avatar Aug 16 '21 14:08 petdance

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 avatar Aug 16 '21 14:08 markstos

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.

markstos avatar Aug 16 '21 14:08 markstos