-
-
Notifications
You must be signed in to change notification settings - Fork 789
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
Add global fdignore support #575
Conversation
Welcome!
Great!
I prefer using the same solution that we have for
I think we definitely need a cleaner solution for that. We could add a
That would be great, yes. This could be mentioned in the README and/or the man page. |
src/walk.rs
Outdated
.and_then(|x| if x.is_empty() { None } else { Some(PathBuf::from(x)) }) | ||
// std::env::home_dir() is deprecated. We should switch to the `dirs` crate in the future. | ||
.or_else(|| env::home_dir().map(|p| p.join(".config"))) | ||
.map(|x| x.join("fd/ignore")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it works on Windows as well, but maybe just use .join("fd").join("ignore")
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it 👍.
Thanks for the review! I changed the global ignore file's behavior so that it gets ignored with |
Thank you for the updates. Two things: First, could we please make the documentation less Unix-specific? (i.e. paths like Second, I know this will be hard to add to integration tests. But could you please show a list of tests that you have performed locally to make sure that this works as intended? In particular, I'm thinking about
|
Updated.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for the updates!
Released in fd 8.1.0 |
Rust newbie here :-)
This implements global fdignore support in
~/.config/fd/ignore
as mentioned here.I have some questions:
std::env::home_dir()
(which is deprecated) instead of using thedirs
crate, because this is what theignore
crate does. Which would you prefer?*
in my~/.config/fd/ignore
, the tests will break. The simplest way I can think of to deal with this is to add a!*
using--ignore-file
.