如果我调用ag "SomeTest" ~/foo,我没有得到任何结果,而cd ~/foo; ag "SomeTest"列出了预期的结果。怎么回事?
发布于 2017-01-16 14:07:16
也许您正在搜索的文件位于符号链接的目录中,除非您使用-f标志指示ag,否则ag不会跟随该目录。例如:
$< /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:testhttps://stackoverflow.com/questions/31459224
复制相似问题