-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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] Can rg search a symlink to a directory that is explicitly ignored by a different name? #1484
Comments
In the future, could you please include more details in your bug report? In particular, please show your problem rather than just describing it. e.g., Instead of "The problem I'm having is that specifying an ignore rule for the releases directory also prevents the current symlink and its contents from being searched.", please show exactly what you tried. For example:
Which seems to do exactly what you want. |
Will do--I'll keep that in mind for the future. After noticing your example worked, I dug deeper. While my custom ignore file was being overlooked, the I have a
The contents of the
I would then run the following command on the example structure:
The output would still list:
I then tried differing paths for the
I then tried passing the option to
That worked. The That got me thinking about environment variables, so I tried an absolute path in the config—and it worked:
My takeaway from this is that environment variables are not understood when used in the I don't know if this is something you'd want to support, but I'll propose it for your consideration. Thanks a bunch for helping me through this. |
Correct. In particular, from the section on config files in the GUIDE:
The config format is deliberately simplistic. While it does prevent some conveniences like environment variables, it makes the file very easy to read with no additional layer of escaping. e.g., If environment variables were supported then there would need to be some sort of escaping mechanism to permit literals of the form |
Hi,
What version of ripgrep are you using?
How did you install ripgrep?
brew
What operating system are you using ripgrep on?
MacOS Catalina 10.15.3 (19D76)
Describe your question, feature request, or bug.
I have the following directory structure:
The
current
symlink is a sibling of thereleases
directory.current
is a symlink to one of the dated release directories contained withinreleases
. Each dated release directory is just a more up to date snapshot of a codebase.Given that each dated release directory is almost the same, it would be nice for
rg
to ignore them. In fact, ignore all of them. The only dated release directory I'm interested in is the one symlinked tocurrent
.The problem I'm having is that specifying an ignore rule for the
releases
directory also prevents thecurrent
symlink and its contents from being searched. I think I understand why this would happen.Is it possible to search under the
current
symlink while ignoring all thereleases
's dated release directories? I realize this is a paradox of sorts, so I'm asking in the off chance I overlooked this in the documentation.To be clear,
rg
is being invoked with the ability to follow symlinks, and does work when the ignore rule is removed.Thanks!
The text was updated successfully, but these errors were encountered: