Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about using glob pattern with rg #155

Closed
senthil1216 opened this issue Apr 21, 2023 · 1 comment
Closed

Question about using glob pattern with rg #155

senthil1216 opened this issue Apr 21, 2023 · 1 comment

Comments

@senthil1216
Copy link

I am a new beginner user to Emacs.
Can someone point on how to use rg.el along with glob patterns to include or exclude dirs?
This is the command i have been using

M-x rg RET
Regexp search for (default -*-): SEARCH_PATTERN -g *.txt

But i get the results as
rg finished with no matches found at Fri Apr 21 10:23:12

@dajva
Copy link
Owner

dajva commented Apr 30, 2023

Normally you us the ripgrep type flag, iow using predefined file types that could include one or more glob pattern. If you want to use custom glob patterns you just insert that in the file type prompt instead of the predefined rigpgrep type. See https://rgel.readthedocs.io/en/2.2.1/usage.html#file-type-aliases
ripgrep has the --glob flag for more advanced including and excluding of files dir. It's available from the rg.el menu but you have to consult the ripgrep manual how to use it.

@dajva dajva closed this as completed Jun 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants