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

房东的猫 提交于 2019-12-04 22:14:01
robd

For ack version 1.x

I found this worked if I removed the asterisk (from the Ackmate wiki)

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

You can see what types of file ackmate supports by running (including those you've specified in ~/.ackrc):

~/Library/Application\ Support/TextMate/PlugIns/AckMate.tmplugin/Contents/Resources/ackmate_ack --help type
mMontu

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.

For ack version 1.x use the following. In my case, I want to ignore .css files. I have to set the type called SOMETHING. Then set it to --noSOMETHING to remove it from search.

 ack --type-set=SOMETHING=.css --noSOMETHING "My Bitcoin."

ack doesn't recognize .orig files in the first place. I'm guessing you are somehow invoking ack -a either from your ackrc or ACK_OPTIONS.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!