Search code examples
ack

Is there any way to search in filetypes not recognized by ack?


You can use ack --js to search only in js files. But what if the file type I want to search for is not currently recognized by ack? Any way to work around it?


Solution

  • You could define a new type by adding something like:

    --type-set=eiffel=.e,.eiffel
    

    ...to your ~/.ackrc file. You could also use the -a command-line option that searches (nearly) all files.