-
-
Notifications
You must be signed in to change notification settings - Fork 821
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 gitignore rules when explicitly searching inside an ignored dir #1108
Comments
I think that's a little too aggressive: what if there is another git directory within the search path? I think its .gitignore should still be respected. The right behaviour might be to enable |
@tavianator not certain I understood what you mean. In case of a nested git repo, fd should respect the "closest" |
Right, but if you turn on |
Oh but actually, I think I misinterpreted your question a bit. |
However, I still think |
@tavianator correct, that's the issue i was running into, and was very confused, esp after I already used the |
No, I just think that
is not the right fix, but
is the right fix. |
ah, sure, that could also work, thanks! You basically propose a new |
To improve usability, I think it would be good to ignore the rules in
.gitignore
when the user tries to search inside a dir that is already ignored. This will result in far fewer "gotcha" moments. For example, assume I am searching inside a Rust project:Note that .gitignore may have multiple rules, e.g.
target/
and*.rmeta
, but I believe the logic for ignoring should be: "if the dir is excluded, but gets included becausefd
is ran inside of the ignored dir or is explicitly listed as a param, automatically enable the-I
param`The text was updated successfully, but these errors were encountered: