Skip to content

docs: clarify that -e/--extension matches all entry types#2001

Open
leno23 wants to merge 2 commits into
sharkdp:masterfrom
leno23:docs/extension-help-1693
Open

docs: clarify that -e/--extension matches all entry types#2001
leno23 wants to merge 2 commits into
sharkdp:masterfrom
leno23:docs/extension-help-1693

Conversation

@leno23
Copy link
Copy Markdown

@leno23 leno23 commented May 16, 2026

Summary

Clarifies documentation for -e / --extension (#1693): the filter matches any entry whose name ends with the extension, including directories (e.g. clojure.zip/), not only regular files.

Follows maintainer feedback on #1922:

  • Short help (-h): minimal — "Filter by extension"
  • Long help (--help) and fd.1: note that --type can restrict entry types

Test plan

  • cargo clippy -- -D warnings
  • Doc-only change (no runtime behavior change)

Made with Cursor

Short help stays minimal; long help and man page explain that extension
filtering applies to directories as well unless --type restricts results.

Addresses maintainer feedback on sharkdp#1922. Fixes sharkdp#1693

Co-authored-by: Cursor <cursoragent@cursor.com>
@leno23 leno23 force-pushed the docs/extension-help-1693 branch from 69c10ca to e60582f Compare May 16, 2026 20:47
@leno23

This comment was marked as low quality.

Scope this branch to -e/--extension only (sharkdp#1693). Full-path help
clarifications remain in sharkdp#1997.

Co-authored-by: Cursor <cursoragent@cursor.com>
@leno23
Copy link
Copy Markdown
Author

leno23 commented May 16, 2026

@tmccombs Thanks for the review on #1922 — pushed e60582f to address it:

  • -h: short help is only `Filter by extension` (details in `--help` / doc comment).
  • man: avoids “not just files”; says the filter applies to all entry types and points to `--type`.
  • scope: removed accidental `--full-path` doc edits from this branch (those are in docs: clarify --full-path help text (fixes #1686) #1997 only).

CI should stay green. Happy to close this if you prefer updating #1922 instead.

@leno23

This comment was marked as low quality.

Comment thread doc/fd.1
Filter search results by extension
.IR ext .
This option can be used repeatedly to allow for multiple possible file extensions.
By default, this applies to all entry types. Use \fB\-\-type\fR to restrict
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be more clear to say it applies to "both files and directories".

Also, I'd prefer for this to come after teh comment about it being allowed to be used repeatedly.

Same applies to the help text.

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.

2 participants