Skip to content

Recognise fd indexing commands by program name - #2190

Merged
bbatsov merged 2 commits into
masterfrom
fix/fd-exclusions-custom-args
Sep 16, 2026
Merged

bbatsov merged 2 commits into
masterfrom
fix/fd-exclusions-custom-args

Conversation

@bbatsov

@bbatsov bbatsov commented Sep 15, 2026

Copy link
Copy Markdown
Owner

Alien indexing told fd apart from git ls-files by the --strip-cwd-prefix flag, so an fd whose projectile-git-fd-args lacks it got git exclude pathspecs and died with "No valid search paths given". Dirconfig + directories were passed to it wrong for the same reason. A command that's neither fd nor git now gets filtered in Lisp instead of guessed at.

Fixes #2187


  • The commits are consistent with our contribution guidelines
  • You've added tests (if possible) to cover your change(s)
  • All tests are passing (eldev test)
  • The new code is not generating bytecode or M-x checkdoc warnings
  • You've updated the changelog (if adding/changing user-visible functionality)
  • You've updated the docs (when adding new project types, configuration options, commands, etc)

Alien indexing pushes the ignore rules down into the listing command,
and picked the exclusion syntax by spotting `--strip-cwd-prefix' in the
command and otherwise assuming any git project was listed by `git
ls-files'.  With `projectile-git-fd-args' customised without that flag,
fd was handed `:(exclude,glob)' pathspecs, read them as search paths
and failed with "No valid search paths given".  The same check decided
how dirconfig `+' directories are passed, so fd got them as a search
pattern.

The tool is now told apart by the program name (fd, fdfind, git, with
the directory and any .exe dropped), keeping the flag as a fallback
for an fd installed under another name.  A command that is neither is
filtered in Lisp, which is slower but always right.
@bbatsov
bbatsov merged commit 847aacb into master Sep 16, 2026
5 checks passed
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.

Projectile alien indexing fails with "[fd error]: No valid search paths given."

1 participant