beyondgrep / ack2

**ack 2 is no longer being maintained. ack 3 is the latest version.**
https://github.com/beyondgrep/ack3/
Other
1.48k stars 138 forks source link

How to ignore .rnd files (permissions issue?) #316

Closed jeanadev closed 4 years ago

jeanadev commented 11 years ago

As ack begins displaying search results this line will appear

ack: .rnd: cannot open file for reading

and then ack just hangs.

I added

--ignore-file=ext:rnd

to my .ackrc file, and I tried

--ignore-file=ext.rnd
--ignore-file=rnd 
--ignore-file=.rnd 

and I still get the

ack: .rnd: cannot open file for reading

message.

More info about the .rnd file...

ls -al .rnd
-rw-------  1 root  staff  1024 Sep 14  2011 .rnd

Any idea how I can successfully ignore this file?

petdance commented 11 years ago

My gut feel seeing this is that we need to short-circuit trying to open the file as soon as we know that it's going to be ignored anyway. I'm betting that we are trying to check -T on the file even with the --ignore-file successfully matching.