Skip to content

fix(filesystem): fix numerous problems with searching #815

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

Merged
merged 3 commits into from
Mar 18, 2023

Conversation

cseickel
Copy link
Contributor

fixes #806

This fixes #806 by inserting the user supplied find args at the right location.

It also refactors cancelling of search jobs in a safe way, and manages the limit better by only counting the result if the
score is > 0. Also, once the limit is reached, it cancels the external search job (which is fd or find).

Using these args in my personal config, I can now do a fuzzy search from root and actually find a file in a reasonable
amount of time:

  find_args = {
    fd = {
      "--exclude",
      ".git",
      "--exclude",
      "node_modules",
      "--exclude",
      "/sys",
      "--exclude",
      "/proc",
      "--exclude",
      "/tmp",
    },
  }

@cseickel cseickel merged commit 673e0fc into main Mar 18, 2023
@cseickel cseickel linked an issue Mar 18, 2023 that may be closed by this pull request
@cseickel cseickel deleted the tweak-fuzzy-search branch July 15, 2023 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] find_args not applied correctly when using fd/fdfind
1 participant