Skip to content

[BUG] fd -e <ext> extension search matches foo.<ext> in directory names #1693

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

Open
1 task done
qazwsxpawel opened this issue Mar 22, 2025 · 1 comment
Open
1 task done
Labels

Comments

@qazwsxpawel
Copy link

Checks

  • I have read the troubleshooting section and still think this is a bug.

Describe the bug you encountered:

Given the description of the -e option I think it could be reasonable to expect only matching files with a given extension, instead directories with .<ext> suffix are also matched e.g.

~/temp/bar » fd -e b
a.b/

An example of where those kinds of directory names can be found would be package names in some langs e.g. clojure.zip.

Describe what you expected to happen:

No response

What version of fd are you using?

fd 10.2.0

Which operating system / distribution are you on?

Darwin 21.5.0 x86_64
@tavianator
Copy link
Collaborator

I don't think we can change the behaviour here, so at most this is a documentation issue. Where do you think the documentation should be clarified?

I think it would clutter the documentation a lot to change every mention of "files" to "files or directories". The UNIX convention is that directories are a kind of file. Perhaps we can mention this once somewhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants