-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
find: clarify description #15542
base: main
Are you sure you want to change the base?
find: clarify description #15542
Conversation
That could still be interpreted as searching for both at the same time, so if anyone has any suggestions on how to make the wording better it would be appreciated. |
@@ -9,7 +9,7 @@ | |||
|
|||
- Find files matching multiple path/name patterns: | |||
|
|||
`find {{root_path}} -path '{{**/path/**/*.ext}}' -or -name '{{*pattern*}}'` | |||
`find {{root_path}} -path '{{*/path/*/*.ext}}' -or -name '{{*pattern*}}'` |
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.
There was also this but I don't know what the difference is.
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.
** (double asterisk)
:
It matches directories recursively, including all levels of subdirectories.
Requires the globstar shell option to be enabled (common in Bash and Zsh).
Example: **/file.ext matches file.ext in the current directory, dir/file.ext, dir/subdir/file.ext, etc.
* (single asterisk)
:
It matches only one level of directory or file names, excluding subdirectories.
Example: */file.ext matches dir/file.ext but not dir/subdir/file.ext.
`find {{root_path}} -path '{{*/path/*/*.ext}}' -or -name '{{*pattern*}}'` | |
`find {{root_path}} -path '{{**/path/**/*.ext}}' -or -name '{{*pattern*}}'` |
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.
Alright, thanks.
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.
You resolved it, but did not apply the suggestion to revert your change.
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.
In the original, @gutjuri said "Good catch", so I assumed single stars would be the right choice
#15108 (comment)
Cherrypicking from #15108