Open TomonoriSoejima opened 4 years ago
try with --search-binary
option?
Came here to say the same; this option used to work fine but it's changed in 2.2.0. --search-binary
seems to be a suddenly requisite for using -z
.
$ echo "The quick brown fox" | tee data.txt | gzip > data.txt.gz
$ ag "quick"
data.txt
1:The quick brown fox
$ ag -z "quick"
data.txt
1:The quick brown fox
$ ag --search-binary -z "quick"
data.txt
1:The quick brown fox
data.txt.gz
1:The quick brown fox
$
I encountered the problem with
-z
option not being able to match anything when I installedag
on my new MacBook Pro.Here you can see it is working with the older version.
In version 2.2.0