Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get ack to ignore *.orig files?

Tags:

ack

I put this in my .ackrc:

--type-set=DUMB=*.orig --noDUMB 

... but I'm still seeing files like main.py.orig in my ack results. I tried doing --type-set=DUMB=*.*.orig too, but that didn't work either.

More info

Run from my command line (OSX Snow Leopard with :

timmfin at lorien in ~/dev/performable/rafa on landing-pages-csv-and-more! ± ack modules --python | grep '.orig' src/rafa/main.py.orig:25:import rafa.ui.modules.helpers src/rafa/main.py.orig:26:from rafa.ui.modules.performable_form import PerformableForm src/rafa/main.py.orig:27:from rafa.ui.modules.page_form import PageEditForm src/rafa/main.py.orig:28:from rafa.ui.modules.settings_form import SettingsForm ....  timmfin at lorien in ~/dev/performable/rafa on landing-pages-csv-and-more! ± cat ~/.ackrc  --color --sort-files --smart-case  --type-set=sass=.sass --type-set=coffee=.coffee  --ignore-dir=rafa/static --ignore-dir=compiled --ignore-dir=compressed  --ignore-dir=venv --ignore-dir=build  timmfin at lorien in ~/dev/performable/rafa on landing-pages-csv-and-more! ± ack --version ack 1.94 Running under Perl 5.10.0 at /usr/bin/perl 
like image 790
timmfin Avatar asked Jan 20 '11 14:01

timmfin


Video Answer


1 Answers

Now that ack 2.0 is available:

--ignore-file=ext:orig 

, either on command line or .ackrc.

It is possible to ignore files by name. To ignore ctags generated files:

--ignore-file=is:tags 

Filters for different uses can be found on documentation.

like image 60
mMontu Avatar answered Sep 23 '22 12:09

mMontu