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
It would appear that ack doesn't recognize a filename that's all extension; that is, when you specify an extension of ".htaccess", ack only looks for files with at least one character before that extension.
To get around this, you can use
-u/--unrestrictedin combination with the-G regexflag (to restrict the search to files whose names match a regex). For example: