dajva / rg.el

Emacs search tool based on ripgrep
https://rgel.readthedocs.io
GNU General Public License v3.0
471 stars 38 forks source link

Searching multiple directories in one go #102

Closed mcraveiro closed 3 years ago

mcraveiro commented 3 years ago

Hi rg developers,

Many thanks for an amazing Emacs mode, which I use daily. I have a question for you, I tend to have to search several groups of directories often, for example: all servers in DEV environment, or all servers in UAT environment. These are basically groups of Windows shares, e.g. DEV could be:

\\some_server\share\a
\\some_server\share\b

These shares have log files. At present I end up having to run individual searches on each folder which is a bit painful. Is there a way for me to tell rg about these directory groups by any chance?

Many thanks for your time

Marco

dajva commented 3 years ago

You can do it if you use universal argument with the rg and rg-literal command. You can then modify the full command line before doing the search.

Not very convenient, I know. I do plan to support this better in the future but I don't know when due to time constraints.

mcraveiro commented 3 years ago

Hi @dajva,

thanks for the swift reply. This sounds great. I guess an even more convenient way then is for me to create some elisp wrappers around rg that supply the fixed list of directories (these never change, really). I could have my own search-dev, search-uat etc canned methods. I'll give this a spin and paste it in this ticket for anyone with similar needs.

Cheers

Marco