Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to let ack support more filetypes?

Tags:

ack

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

like image 712
prime23 Avatar asked Oct 06 '10 08:10

prime23


1 Answers

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

  • The .ackrc file
  • Defining your own types
  • ack version 2 man page
like image 54
prime23 Avatar answered Oct 04 '22 00:10

prime23