3

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?

5

Use ack without a --type predicate:

ack <search pattern>

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

3
  • 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 0:53
  • 1
    I have clearly edited my answer for you ;-) – garethTheRed Nov 25 '14 at 6: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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.