如何让ack支持更多文件类型? [英] How to let ack support more filetypes?

查看:131
本文介绍了如何让ack支持更多文件类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在ack的首页中,列出了很多文件类型,但是没有aspx,是否可以让ack

in ack's home page, there lists a lot of file type, but without aspx, is it possible to let ack support it?

推荐答案

在窗口上,在C:\Documents and Settings\您的名字下添加.ackrc文件,并包含内容

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



注意

ack 的语法和行为在版本2中已发生重大变化。在版本2中,上述等效项是:

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

语法为的类型集TYPE:FILTER:FILTERARGS FILTER 可以是 ext,是,匹配,firstlinematch 。您绝对应该阅读手册页以获得详细说明。

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.

请参见

  • The .ackrc file
  • Defining your own types
  • ack version 2 man page

这篇关于如何让ack支持更多文件类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆