How can I force ag to find matches in node_modules? -


i'm using ag search git repo. doesn't find matches under node_modules subdirectory. why not, , how can control behavior?

it turns out ag honors contents of .gitignore file default. if node_modules in .gitignore, ag won't search it. sensible behavior, difficult debug if aren't expecting it. post help.

there's summary @ end of man ag:

ignoring files     default, ag ignore files names match patterns in  .gitig-    nore,  .hgignore,  or  .agignore.  these  files  can anywhere in    directories being searched.  ag   ignores  files  matched      svn:ignore property if svn --version 1.6 or older. finally, ag looks    in $home/.agignore ignore patterns. binary  files   ignored     default well.     if  want ignore .gitignore, .hgignore, , svn:ignore, still    take .agignore account, use -u.     use -t option search text files; -a search files; ,    -u search all, including hidden files. 

for purposes ag -t seems work well.


Comments