How to let ack support more filetypes?

点点圈 提交于 2019-11-30 04:12:36
prime23

On window,add .ackrc file under C:\Documents and Settings\yourname,with content

--type-set=aspx=.aspx

you can set a type to multi file extension,seperate by ","

--type-set=aspx=.aspx,.ascx
Note

ack syntax and behaviour has changed significantly with version 2. The equivalent of the above in version 2 would be:

--type-set=aspx:ext:aspx,ascx

Where the syntax is --type-set TYPE:FILTER:FILTERARGS and FILTER can be any of ext, is, match, firstlinematch. You should definitely read the man page for detailed explanation.

see

--type-add TYPE=.EXTENSION[,.EXT2[,...]]
                    Files with the given EXTENSION(s) are recognized as
                    being of (the existing) type TYPE

from http://betterthangrep.com/

You can add this to .ackrc in your homedirectory.

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