-
-
Notifications
You must be signed in to change notification settings - Fork 814
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
No option to limit search to one file system #507
Comments
This adds a `--same-file-system` CLI option that instructs the walker to not cross file system boundaries. Due to the fact that the corresponding option of the `ignore` crate's `WalkBuilder` does not support platforms other than Unix and Windows, the option does nothing on platforms other than those. Closes sharkdp#507
This adds a `--same-file-system` CLI option that instructs the walker to not cross file system boundaries. Due to the fact that the corresponding option of the `ignore` crate's `WalkBuilder` does not support platforms other than Unix and Windows, the option does nothing on platforms other than those. Resolves sharkdp#507
Oh, sorry. Seems my search terms weren't precise enough. However, since this uses an existing feature of the ignore crate, there shouldn't be any performance degradation if the option is not used, since the ignore crate defaults it to false anyway. Since it is basically just adding a public API for a feature that already existed, albeit unused, I wonder if you'd consider adding it. If not, feel free to close this and the corresponding PR. |
Ok, that sounds reasonable. I'll take a look at the PR soon, thank you. |
This adds a `--same-file-system` CLI option that instructs the walker to not cross file system boundaries. Due to the fact that the corresponding option of the `ignore` crate's `WalkBuilder` does not support platforms other than Unix and Windows, the option does nothing on platforms other than those. Resolves sharkdp#507
Released in fd 7.5.0 |
Many tools surrounding file system traversal include an option to disable crossing file system boundaries. find includes the
-xdev
option, which accomplishes this. fd, however, seems to lack such a feature at the present time. I've looked through the man page and the issue list and was unable to find anything relating to this.Looking at the docs of the ignore crate, implementation should be quite simple as well: it only requires adding a call to
.same_file_system(config.same_file_system)
to theWalkBuilder
, assuming a corresponding optionsame_file_system: bool
is added toFdOptions
, with corresponding changes inbuild_app()
andmain()
.The text was updated successfully, but these errors were encountered: