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

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

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
social4hyq pushed a commit to social4hyq/homebrew-core that referenced this pull request Sep 20, 2026
fd 10.5.0

Created-by: HarmonybrewBot
Commit-by: HarmonybrewBot
Merged-by: HarmonybrewBot
Description: Created by `brew bump`

---

Created with `brew bump-formula-pr`.<details>
  <summary>release notes</summary>
  <pre>## Features
- Add `--ignore-parent` option to override `--no-ignore-parent`, see #1958 (@tmchow)
- Add `--exact` option to match the entire filename exactly (literal, non-substring).

## Bugfixes
- Sanitize control characters and bidirectional override characters in filenames
  when output goes to a terminal, to prevent terminal escape-sequence injection.
  Also reject a placeholder as the executable for `--exec-batch`, while still
  allowing it for `--exec`.
- Handle invalid working directories gracefully when using `--full-path`, see #1900 (@Xavrir).
- Fire the "search pattern contains a path separator" diagnostic for any pattern containing `/`, not just patterns that happen to name an existing directory. Preserves the legacy Windows behaviour that also flags native `\` separators when the pattern resolves to a real directory. See #1873.
- Also fire the "search pattern contains a path separator" diagnostic for `--and` patterns, not only the primary positional pattern. `--and` patterns are matched against the file name just like the primary pattern, so a path separator in them silently returned zero results. See #1873.
- Fix bug where passing "-" as a directory argument didn't actually search that directory, see #849 (@Sean-Kenneth-Doherty).
- Fix panic when `--changed-before`/`--changed-within` is given an out-of-range `@` Unix timestamp; the value is now rejected gracefully, see #2081 (@nikolauspschuetz).


## New Contributors
* @liruiluo made their first contribution in sharkdp/fd#1924
* @Xavrir made their first contribution in sharkdp/fd#1917
* @rexkirshner made their first contribution in sharkdp/fd#1921
* @Rohan5commit made their first contribution in sharkdp/fd#1934
* @tmchow made their first contribution in sharkdp/fd#1959
* @YoshKoz made their first contribution in sharkdp/fd#1979
* @SAY-5 made their first contribution in sharkdp/fd#1975
* @skane-lukas made their first contribution in sharkdp/fd#1889
* @Sean-Kenneth-Doherty made their first contribution in sharkdp/fd#2006
* @stevenwalton made their first contribution in sharkdp/fd#2011
* @DeflateAwning made their first contribution in sharkdp/fd#1983
* @wyf027 made their first contribution in sharkdp/fd#2001
* @bonanza127 made their first contribution in sharkdp/fd#2040
* @mahirhir made their first contribution in sharkdp/fd#2036
* @parneetsingh022 made their first contribution in sharkdp/fd#2037
* @curious-rabbit made their first contribution in sharkdp/fd#1976
* @WilliamLeony made their first contribution in sharkdp/fd#2064
* @kobihikri made their first contribution in sharkdp/fd#2063
* @cmelaro made their first contribution in sharkdp/fd#2075
* @nikolauspschuetz made their first contribution in sharkdp/fd#2082

**Full Changelog**: https://github.com/sharkdp/fd/compare/v10.4.2...v10.5.0</pre>
  <p>View the full release notes at <a href="https://github.com/sharkdp/fd/releases/tag/v10.5.0">https://github.com/sharkdp/fd/releases/tag/v10.5.0</a>.</p>
</details>
<hr>

See merge request: Harmonybrew/homebrew-core!17790
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