Description
Glob
inherits from Python's glob.glob
special handling of directory entries that begin with dot. This rule is, in turn, inherited from POSIX (UNIX) glob
, which refers to this piece from section 2.13.3 on filename expansion:
2.If a filename begins with a
<period>
('
.'), the<period>
shall be explicitly matched by using a<period>
as the first character of the pattern or immediately following a<slash>
character. The leading<period>
shall not be matched by the<asterisk>
or<question-mark>
special characters, a bracket expression containing a non-matching list, such as "[!a]
", a range expression, such as "[%−0]
", or a character class expression, such as "[[:punct:]]
".
In very recent Python (will be in the 3.11 release next month), there is a new flag include_hidden
which turns off this special behavior and allows a leading dot to be matched.
Propose that we extend Glob
with a keyword argument of the same functionality (could be the same name or different)