mirror of
https://github.com/sharkdp/fd.git
synced 2026-08-29 02:32:00 +08:00
Merge pull request #2001 from leno23/docs/extension-help-1693
docs: clarify that -e/--extension matches all entry types
This commit is contained in:
@@ -328,7 +328,7 @@ Options:
|
||||
-t, --type <filetype> 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 <ext> Filter by file extension
|
||||
-e, --extension <ext> Filter by extension
|
||||
-S, --size <size> Limit results based on the size of files
|
||||
--changed-within <date|dur> Filter by file modification time (newer than)
|
||||
--changed-before <date|dur> Filter by file modification time (older than)
|
||||
|
||||
@@ -257,9 +257,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 option can be used repeatedly to allow for multiple possible extensions.
|
||||
By default, extension filters apply to both files and directories. Use
|
||||
\fB\-\-type\fR to restrict the search to specific types.
|
||||
|
||||
If you want to search for files without extension, you can use the regex '^[^.]+$'
|
||||
as a normal search pattern.
|
||||
|
||||
+4
-3
@@ -377,8 +377,9 @@ pub struct Opts {
|
||||
)]
|
||||
pub filetype: Option<Vec<FileType>>,
|
||||
|
||||
/// (Additionally) filter search results by their file extension. Multiple
|
||||
/// allowable file extensions can be specified.
|
||||
/// Filter results by extension. By default, this matches all entry types
|
||||
/// (including directories whose names end with the extension). Use `--type`
|
||||
/// to restrict the search to specific types. Multiple extensions can be specified.
|
||||
///
|
||||
/// If you want to search for files without extension,
|
||||
/// you can use the regex '^[^.]+$' as a normal search pattern.
|
||||
@@ -386,7 +387,7 @@ pub struct Opts {
|
||||
long = "extension",
|
||||
short = 'e',
|
||||
value_name = "ext",
|
||||
help = "Filter by file extension",
|
||||
help = "Filter by extension",
|
||||
long_help
|
||||
)]
|
||||
pub extensions: Option<Vec<String>>,
|
||||
|
||||
Reference in New Issue
Block a user