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?
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.