-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Clarify that -e/--extension matches all entry types #1922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -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. | ||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
maybe? |
||||||||
| 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. | ||||||||
|
|
||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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)", | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this is necessary in the short help (output with I think mentioning this would be fine in the long help (output with |
||
| long_help | ||
| )] | ||
| pub extensions: Option<Vec<String>>, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On linux at least, a directory is a file.