Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

silver searcher ignore multiple directories

using The silver searcher how can I ignore multiple directories?

I tried ag foo --ignore-dir dir1,dir2 but it doesn't work.

like image 975
Harry Moreno Avatar asked Apr 13 '16 14:04

Harry Moreno


2 Answers

You an also do this (without needing to repeat the flag):

ag foo --ignore-dir={dir1,dir2}

You need to use this format with more than one directory. Otherwise, if it's with just one directory, you'd need to provide a comma, like: ag foo --ignore-dir={dir1,}.

like image 77
gylaz Avatar answered Nov 11 '22 07:11

gylaz


you can specify the argument multiple times

ag foo --ignore-dir dir1 --ignore-dir dir2

like image 38
Harry Moreno Avatar answered Nov 11 '22 06:11

Harry Moreno