668 Commits

Author SHA1 Message Date
Thayne McCombs 42b2ab8a84 Merge pull request #1983 from DeflateAwning/feat-exact-i1963
feat: Add --exact argument to match exact filename
2026-05-20 01:26:24 -06:00
Thayne McCombs febc1b692f Merge pull request #2011 from stevenwalton/master
docs: Update Help String
2026-05-18 00:22:07 -06:00
Steven Walton 2fbecc9bd8 Swap regex and glob, fixing space. 2026-05-17 18:45:39 -07:00
Steven Walton 4d88708d79 That period shouldn't have been included 2026-05-17 10:13:45 -07:00
Steven Walton 96a8dcd58b docs: Update Help String
Updated help string to clarify that fd respects gitignore by default.
Also added verbage to clarify that globbing and regex patterns are
accepted without a flag.
2026-05-17 10:07:02 -07:00
Sean Doherty 8dfa67a245 Treat single dash as search path 2026-05-16 17:15:00 -05:00
DeflateAwning d642c446c9 fix: --exact should conflict with --fix-strings 2026-05-14 14:03:44 -06:00
DeflateAwning 468c807049 docs: Update suggested non-regex note on regex failure 2026-04-23 15:31:03 -06:00
DeflateAwning 82485bf18a feat: Add --exact argument to match exact filename 2026-04-22 18:51:04 -06:00
SAY-5 ed47664191 fix: flag any pattern containing a path separator, not just ones that name a directory
Without --full-path, fd matches patterns against file names, so any pattern
containing a path separator can never match. The previous implementation
in main.rs fired the path-separator diagnostic only when the pattern also
named an existing directory on disk, so the most common Linux/macOS typo
- pasting a full path as the pattern - silently returned zero matches.

Restructure ensure_search_pattern_is_not_a_path so that any '/' in the
pattern triggers the diagnostic unconditionally, and keep the existing
'directory must exist on disk' guard only for the native '\' separator
on Windows, which is also the regex escape character. The Windows check
is short-circuited via '||' so the is_dir syscall never runs when the
pattern already contains '/'. The #[cfg_attr(not(windows), allow(unused_mut))]
attribute keeps the mut binding warning-free on non-Windows targets.

Update the error message to drop the now-ambiguous parenthetical that
showed the platform-specific separator character, and widen the
integration test assertions to cover the full first line so the
assert_failure_with_error helper (which trims lines on both sides) cannot
early-accept on a partial prefix.

Closes #1873

Signed-off-by: SAY-5 <SAY-5@users.noreply.github.com>
2026-04-20 18:18:21 -07:00
Trevin Chow 72ff3cf694 feat: add --ignore-parent option to override --no-ignore-parent
Add the --ignore-parent flag, mirroring the existing pattern where
--ignore-vcs overrides --no-ignore-vcs. This lets users undo
--no-ignore-parent in aliases or config files.

Closes #1958
2026-04-06 00:53:39 -07:00
Codex 078f5d184e docs: fix macOS spelling in BSD ls comment 2026-04-04 10:14:25 +08:00
Thayne McCombs dc9c503c7d refactor: Rename cwd as full_path_base
Because I think it makes it's intention more clear.
2026-03-17 00:53:34 -06:00
Thayne McCombs cd4fd03fa0 refactor: Avoid unnecessary allocation
Use Cow::borrowed, if we can re-use the already absolute path.
2026-03-17 00:53:34 -06:00
Thayne McCombs fcd846651b Merge pull request #1921 from rexkirshner/fix-exclude-value-name-glob
Change --exclude value name from 'pattern' to 'glob'
2026-03-17 00:17:24 -06:00
Thayne McCombs 6d77799759 Merge pull request #1917 from Xavrir/issue-1900
fix: handle invalid working directories gracefully with --full-path
2026-03-16 02:36:16 -06:00
liruiluo 2278836060 docs: clarify --exec positional argument handling 2026-03-14 09:16:22 +08:00
Rex Kirshner 37f3c2e6cb Change --exclude value name from "pattern" to "glob"
The summary line `-E, --exclude <pattern>` is misleading because fd
defaults to regex for its main search pattern, but --exclude takes a
glob. Rename the value placeholder to "glob" in the CLI help, man page,
and README to match the actual behavior.

Fixes #1724

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 09:03:56 -07:00
Rizky Mirzaviandy Priambodo 647ced8ff0 fix: address review comments - use into_os_string() and move changelog to unreleased section 2026-03-11 22:11:26 +07:00
Rizky Mirzaviandy Priambodo 26756f21fa refactor: cache cwd at startup instead of per-entry resolution
Instead of calling current_dir() for every entry when --full-path is
set, cache it once in Config at startup. This eliminates the need for
FatalError handling and makes path resolution infallible during the
walk. If the cwd can't be retrieved, fd now fails early with a clear
error message.
2026-03-10 20:34:38 +07:00
Rizky Mirzaviandy Priambodo d3a500af7a fix: handle invalid working directories gracefully with --full-path (#1900)
- Add FatalError variant to WorkerResult for unrecoverable errors
- Extract search_str_for_entry() helper to propagate IO errors from path_absolute_form
- Propagate fatal errors through job and batch execution paths
- Add regression test for invalid cwd scenario
- Update CHANGELOG for #1900
2026-03-10 20:28:12 +07:00
Thayne McCombs a4d86cc1f5 perf: Avoid unnecessary syscall for ignore-contain
Instead of calling `is_dir` on the path, call it on the file_type of the
DirEntry, since we should already have that information without needing
to do another syscall.

Fixes: #1913
2026-03-08 17:09:39 -06:00
Thayne McCombs bf81fb98fa Merge pull request #1852 from fischman/1727-ignore-contain
`--ignore-contain`: ignore directories containing a named entry.
2026-01-20 00:48:43 -07:00
Joseph Adams cd8fedc183 Fix Windows hyperlinks for paths with spaces
Fixes #1843

Changed the host() function for Windows to return '/' instead of ''
to generate RFC 3986 compliant file URLs with three slashes.

Before: file://C:/test/hi%20there.txt (broken)
After:  file:///C:/test/hi%20there.txt (works)

This fixes hyperlinks failing on Windows when file paths contain
spaces or other characters that require percent-encoding.
2026-01-14 23:53:43 +01:00
Ami Fischman f3a8bb7ce6 ignore_contain now has higher precedence than root check. 2026-01-14 07:58:30 -08:00
Ami Fischman 1df183e0cd cargo fmt 2026-01-13 16:37:11 -08:00
Ami Fischman 1993c76971 Fixes for tmccombs review comments. 2026-01-13 16:16:11 -08:00
Ami Fischman d05a718be5 --ignore-contain: ignore directories containing a named entry (e.g. [CACHEDIR.TAG](https://bford.info/cachedir/)).
Fixes #1727.
2025-11-28 11:49:37 -08:00
Thayne McCombs dbd3e3c14c build(msrv): Update msrv to 1.90.0
And upgrade to 2024 edition
2025-10-27 02:05:37 -06:00
Thayne McCombs 5558e407be Merge pull request #1805 from tmccombs/exec-nuls
fix: --print0 now works with --exec
2025-10-25 23:49:24 -06:00
Sivaram Kannan c7a05504f4 Remove the trailing white space in -C short option. 2025-10-14 11:42:46 +05:30
Sivaram Kannan 4e6f46b191 Add short option -C to the option base-directory. 2025-10-14 08:12:04 +05:30
Thayne McCombs ee5332d0d3 fix: --print0 now works with --exec
If you use --print0 with --exec, it will now print a \0 between each set
of commands run. That is, between the output for the commands run for
each found item.

Fixes: #1797
2025-10-03 01:15:48 -06:00
Thayne McCombs 2ae1154be4 fix: Clippy warning from anyhow update 2025-10-02 23:08:37 -06:00
Tavian Barnes 677823227c filesystem: Fix a clippy warning about lifetime elision 2025-08-11 21:02:01 -04:00
Neal S 56ca42aed0 Do not use jemalloc on Illumos
Fix for #1741: jemalloc doesn't build on Illumos, so add it to the list of excluded
platforms.
2025-06-20 19:03:53 -04:00
Benjamin A. Beasley cb150c4fd4 Depend on jemallocator as tikv-jemallocator
Upstream writes: “The project is also published as jemallocator for
historical reasons. The two crates are the same except names. For new
projects, it's recommended to use tikv-xxx versions instead.”
2025-05-14 17:46:08 -04:00
Tavian Barnes 3651f86162 Use next_back() instead of last()
Fixes a new Clippy warning.
2025-04-24 10:01:06 -04:00
Thayne McCombs f370301a5b Use guard to ensure cleanup of test time 2025-03-22 02:03:15 -06:00
Thayne McCombs f36c7d0be2 refactor: Simplify time filter code 2025-03-19 00:39:46 -06:00
Thayne McCombs e0363fc9f8 refactor: Avoid passing in current time just for tests
Instead use a thread local variable that we can use to set the current
time, and use a separate now function in tests than the actual binary.
2025-03-17 02:22:38 -06:00
Shun Sakai bbac76747b chore(deps): Replace chrono with jiff 2025-03-13 11:44:36 +09:00
Shun Sakai 7d57f61dfb chore: Change to use jiff::Zoned
Supports when the duration contains calendar units.
2025-03-12 23:50:47 +09:00
Shun Sakai c670a0b366 chore(deps): Replace humantime with jiff 2025-03-12 18:15:37 +09:00
Thayne McCombs 8c177567a7 chore: Fix clippy lints
Use is_some_and instead of map_or(false
2025-01-28 01:55:21 -07:00
Hamir Mahal 87f230a66e fix: formatting in src/ and tests/ 2024-10-06 09:34:41 -07:00
Hamir Mahal 4bdee80afa style: simplify string formatting for readability 2024-10-06 09:33:58 -07:00
Collin Styles 0d99badc1b Add a hidden --mindepth alias for --min-depth 2024-10-02 12:22:01 -04:00
Thayne McCombs 27c6b50919 Fix a new clippy warning 2024-09-23 09:42:58 +02:00
Ross Smyth 80a73fda49 Fix unused config struct field on Windows 2024-07-22 10:02:08 -04:00