diff --git a/README.md b/README.md index d6353edf7..3e10bf4fc 100644 --- a/README.md +++ b/README.md @@ -332,7 +332,7 @@ Options: -t, --type Filter by type: file (f), directory (d/dir), symlink (l), executable (x), empty (e), socket (s), pipe (p), char-device (c), block-device (b) - -e, --extension Filter by file extension + -e, --extension Filter by extension (applies to all entry types) -S, --size Limit results based on the size of files --changed-within Filter by file modification time (newer than) --changed-before Filter by file modification time (older than) diff --git a/doc/fd.1 b/doc/fd.1 index 278c4297b..257ccc7a0 100644 --- a/doc/fd.1 +++ b/doc/fd.1 @@ -250,9 +250,11 @@ Examples: .RE .TP .BI "\-e, \-\-extension " ext -Filter search results by file extension +Filter search results by extension .IR ext . -This option can be used repeatedly to allow for multiple possible file extensions. +This applies to all entry types, not just files. Use \fB\-\-type\fR to restrict +the search to specific types. +This option can be used repeatedly to allow for multiple possible extensions. If you want to search for files without extension, you can use the regex '^[^.]+$' as a normal search pattern. diff --git a/src/cli.rs b/src/cli.rs index 4dbe547e0..95d8ac6cb 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -368,7 +368,7 @@ pub struct Opts { long = "extension", short = 'e', value_name = "ext", - help = "Filter by file extension", + help = "Filter by extension (applies to all entry types)", long_help )] pub extensions: Option>,