0

If I call ag "SomeTest" ~/foo I get no result, while cd ~/foo; ag "SomeTest" lists the expected result. How comes?

rknuus
  • 118
  • 1
  • 9

1 Answers1

0

Perhaps the file you're searching for is in a symbolically linked directory, which ag does not follow unless you instruct to with the -f flag. For example:

$< /tmp/foo
test
$ls -l /tmp/foo
lrwxr-xr-x  1 gregory  wheel  18B Jan 16 01:00 /tmp/foo -> /Users/gregory/foo
$ag test ./tmp
$ag -f test ./tmp
tmp/foo
1:test
gregory
  • 10,969
  • 2
  • 30
  • 42