You can combine ack-grep
's -a
(search everything) with -G
(only search files that match a given regex). Something like:
ack-grep -a -G '^[^.]+$' what-to-search-for
should do the trick.
Under ack2 you have to define a custom type:
ack-grep --WANTED --type-set WANTED:match:^[^.]+$ what-to-search-for
works for me.