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