在我的代码库中查找一行时,我刚刚发现了 The Silver Searcher 的一些奇怪行为。在根文件夹中,我调用
% ag branding_black_with_bundles
% ag --depth -1 branding_black_with_bundles
一无所获。但是,当我用 ack 调用时,我得到了结果
% ack branding_black_with_bundles
app/database/seeds/test_seeder/dumps/Swf.php
88: array("id"=>907,"title"=>"branding_black_with_bundles","original_filename"=>"original_filename","created_by_id"=>2,"created_at"=>"2013-09-14 18:16:12","updated_at"=>"2013-06-15 04:14:50"),
当我 cd 靠近一个目录时,我找到了它:
% cd app
% ag branding_black_with_bundles
database/seeds/test_seeder/dumps/Swf.php
88: array("id"=>907,"title"=>"branding_black_with_bundles","original_filename"=>"original_filename","created_by_id"=>2,"created_at"=>"2013-09-14 18:16:12","updated_at"=>"2013-06-15 04:14:50"),
怎么了?这是一个错误,还是我错过了某种设置?