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

1

14

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.

Musgrave answered 20/12, 2016 at 9:47 Comment(0)
A
18

Check the depth option from the manual :

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

Amputate answered 20/12, 2016 at 9:49 Comment(2)
Thanks! Worked perfectly. It seems that I lost my ability to properly RTFM.Musgrave
Note that Emacs's helm-ag requires the use of the = separator for the long option, e.g. for current directory: --depth=0Shirleneshirley

© 2022 - 2024 — McMap. All rights reserved.