Skip to content
Myr

Change --exclude value name from "pattern" to "glob"

Before adoption: this commit came in with the history the project adopted, so no landing records it.

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

authored by Rex Kirshner · committed by Rex Kirshner · parent 7027d45 · Browse files · 3 files+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Diff stats

3 files+3 added−3 removed

  • other:+3 added−3 removed

3 files+3 added−3 removed

modified:doc/fd.1+1 added-1 removed
255 unmodified lines
256257If you want to search for files without extension, you can use the regex '^[^.]+$'258as a normal search pattern.259.TP260.BI "\-E, \-\-exclude " pattern260.BI "\-E, \-\-exclude " glob261Exclude files/directories that match the given glob pattern.262This overrides any other ignore logic.263Multiple exclude patterns can be specified.264Examples:
314 unmodified lines
modified:src/cli.rs+1 added-1 removed
297 unmodified lines
298 /// {n} --exclude node_modules299 #[arg(300 long,301 short = 'E',302 value_name = "pattern",302 value_name = "glob",303 help = "Exclude entries that match the given glob pattern",304 long_help305 )]306 pub exclude: Vec<String>,
639 unmodified lines
modified:README.md+1 added-1 removed
326 unmodified lines
327 -l, --list-details Use a long listing format with file metadata328 -L, --follow Follow symbolic links329 -p, --full-path Search full abs. path (default: filename only)330 -d, --max-depth <depth> Set maximum search depth (default: none)331 -E, --exclude <pattern> Exclude entries that match the given glob pattern331 -E, --exclude <glob> Exclude entries that match the given glob pattern332 -t, --type <filetype> Filter by type: file (f), directory (d/dir), symlink (l),333 executable (x), empty (e), socket (s), pipe (p), char-device334 (c), block-device (b)335 -e, --extension <ext> Filter by file extension
454 unmodified lines