You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pattern: add more test cases for globstar not used on its own
Bash documents globstar as follows:
When the globstar shell option is enabled, and * is used in a
pathname expansion context, two adjacent *s used as a single pattern
will match all files and zero or more directories and subdirectories
That is, `/**/foo` or `bar/**` both result in globstar globbing
where we can match files and nested directories,
but `/**foo` or `bar**/` do not place the two star characters
in a single pattern, so they behave like a single glob star instead.
The interp and expand packages already deals with this correctly,
because they first split the glob pattern into path elements,
and they deal with one element being exactly "**" in a special way.
The pattern package still aims to support "**" by itself,
but it does not handle this edge case properly;
it treats any occurrence of "**" as a globstar wildcard no matter
whether or not it's on its own as a path element.
Fix coming in the next commit.
For #1149.
0 commit comments