mileszs / ack.vim

Vim plugin for the Perl module / CLI script 'ack'
Other
3.08k stars 396 forks source link

STDERR is not properly ignored/dealt with (e.g. permission denied) #46

Closed tolry closed 10 years ago

tolry commented 12 years ago

Hi,

small problem when searching a directory containing non accessible files (e.g. cache files that were created by a daemon's user). Those error messages are interpreted as matches from ack-grep and displayed accordingly. Since ack-grep seems to properly send these errors to STDERR, a quick fix would be to make the system call using "2>/dev/null".

Detecting and properly showing these messages as error-messages would be even better.

thanks, Tobias

kassio commented 10 years ago

@tolry Thank's for reporting, and sorry about the late. You can change it on you own configuration changing the g:ackprg variable. If you, like me, would like this for default, could you please open a pull request to add this feature?

Thank's a lot.

kassio commented 10 years ago

One more information, ack has a option for that:

-s  Suppress error messages about nonexistent or unreadable files.  This is taken from fgrep.

However this option seems not be working on 2.12, I opened an issue about it there.