Search code examples
ag

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


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.


Solution

  • Check the depth option from the manual :

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