Skip to content

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

Merged
tmccombs merged 3 commits into
sharkdp:masterfrom
wyf027:docs/extension-help-1693
Jun 18, 2026
Merged

docs: clarify that -e/--extension matches all entry types#2001
tmccombs merged 3 commits into
sharkdp:masterfrom
wyf027:docs/extension-help-1693

Conversation

@wyf027

@wyf027 wyf027 commented May 16, 2026

Copy link
Copy Markdown
Contributor

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)

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 #1922. Fixes #1693

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

This comment was marked as low quality.

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

Co-authored-by: Cursor <cursoragent@cursor.com>
@wyf027

wyf027 commented May 16, 2026

Copy link
Copy Markdown
Contributor Author

@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.

@wyf027

This comment was marked as low quality.

Comment thread doc/fd.1 Outdated
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.

@tmccombs tmccombs merged commit 0944460 into sharkdp:master Jun 18, 2026
19 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.

2 participants