Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to I use ag to search only in current folder (nonrecursive)?

Tags:

ag

I love ag :: the_silver_searcher but I am wondering how can I perform a search non-recursively.

Sometimes I want to search only inside files from my home directory but without looking in subdirectories.

like image 328
sorin Avatar asked Dec 20 '16 09:12

sorin


1 Answers

Check the depth option from the manual :

--depth NUM : Search up to NUM directories deep, -1 for unlimited. Default is 25.

like image 93
Charles Paulet Avatar answered Sep 26 '22 18:09

Charles Paulet