4

Manual says that "The --text option has been removed.". It was setting the --type to text, i.e. ack was searching all text files regardless of their semantic category (i.e. in *.php files, *.txt files, *.cpp files, etc.). How to obtain this behavior in current version of ack?

2 Answers2

6

Use ack without a --type predicate:

ack <search pattern>

It ignores binary files and searches all textual files regardless of file type.

garethTheRed
  • 33,957
  • 1
    This is not the same bahavior. As I have clearly described in question, ACK was searching in text files regardless of their semantic category, i.e. in .php files, .pl files, etc. – Jerry Epas Nov 25 '14 at 00:53
  • 1
    I have clearly edited my answer for you ;-) – garethTheRed Nov 25 '14 at 06:38
  • Good luck with a minified js file. It's invisible to ack, even for those magical special type searching in other answers. I think it might be because of line length (3247 chars). – Luciano Fantuzzi Feb 14 '19 at 20:31
1

ack 2 no longer has a --text option because ack 2's default behavior is to search all text files.

This means that

ack1 --text foo

is the same as

ack2 foo