Is there any way to get ack to search through a file whose filename starts with a .
(e.g. .htaccess), without resorting to the --all
or --unrestricted
options?
I've tried adding the following to my ~/.ackrc
file to no avail:
--type-set=apache=.htaccess
Updated @Sean's answer for Ack 2
since they removed the two flags that @Sean used
ack 2 release notes say:
and the -u (unrestricted) flag is not needed any more. So what you want is:
Or, for that matter, just use find to generate the file list (especially useful to find a file in a dotfolder):