Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

find: clarify description #15542

wants to merge 2 commits into from

Conversation

Managor
Copy link
Collaborator

@Managor Managor commented Jan 17, 2025

Cherrypicking from #15108

@github-actions github-actions bot added page edit Changes to an existing page(s). review needed Prioritized PRs marked for reviews from maintainers. labels Jan 17, 2025
@Managor
Copy link
Collaborator Author

Managor commented Jan 17, 2025

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*}}'`
Copy link
Collaborator Author

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.

Copy link
Member

@sebastiaanspeck sebastiaanspeck Jan 18, 2025

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.

Suggested change
`find {{root_path}} -path '{{*/path/*/*.ext}}' -or -name '{{*pattern*}}'`
`find {{root_path}} -path '{{**/path/**/*.ext}}' -or -name '{{*pattern*}}'`

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, thanks.

Copy link
Member

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.

Copy link
Collaborator Author

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
page edit Changes to an existing page(s). review needed Prioritized PRs marked for reviews from maintainers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants