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

ignore rules relativized to command line path #1778

Closed
mobileink opened this issue Jan 7, 2021 · 1 comment
Closed

ignore rules relativized to command line path #1778

mobileink opened this issue Jan 7, 2021 · 1 comment
Labels
duplicate An issue that is duplicative of another.

Comments

@mobileink
Copy link

mobileink commented Jan 7, 2021

What version of ripgrep are you using?

ripgrep 12.1.0
-SIMD -AVX (compiled)
+SIMD +AVX (runtime)

How did you install ripgrep?

I don't remember

What operating system are you using ripgrep on?

MacOS 10.15.7

Describe your bug.

I need to ignore src/lib/snarky/website. If I add this to .ignore and run rg foo src/ it has no effect. However, if I add lib/snarky/website to src/.ignore then it is ignored.

Furthermore rg foo src/lib fails (does not ignore) with both src/.ignoreand .ignore but succeeds with src/lib/.ignore

Whether or not this is a bug is debatable, but it is surprising and cumbersome, since it requires that I match my .ignore files to my search command. Sometimes I want to search src/ and sometimes src/lib, so I have to sprinkle .ignore files throughout my source tree.

@BurntSushi
Copy link
Owner

Dupe of #829.

@BurntSushi BurntSushi added the duplicate An issue that is duplicative of another. label Jan 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate An issue that is duplicative of another.
Projects
None yet
Development

No branches or pull requests

2 participants