Skip to content

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

2 participants