Releases: facelessuser/wcmatch
Releases · facelessuser/wcmatch
4.2.0
4.2.0
- NEW: Drop Python 3.4 support.
- NEW: Add flags
FORCEWIN
andFORCEUNIX
to force Windows or Linux/Unix path logic on commands that do not access the file system:translate
,fnmatch
,filter
,globmatch
,globfilter
, etc. These flags will not work withglob
,iglob
or with theWcMatch
class. It also will not work when using theREALPATH
flag with things likefnmatch
,filter
,globmatch
,globfilter
. - FIX:
glob
corner case where the first folder, if defined as a literal name (not a magic pattern), would not be treated properly ifIGNORECASE
was enabled in Linux.
4.1.0
4.1.0
- NEW: Add
WcMatch.is_aborted
. - FIX: Remove deprecation of
kill
andreset
inWcMatch
. There are legitimate reasons to not deprecate killing viakill
instead of simply breaking. - FIX: If for any reason, a file exists, but fails "is directory" check, consider it as a file.
4.0.1
4.0.1
- FIX: Fix regression with exclusion patterns that use braces in
glob
. - FIX: Translate functions should have
NODIR
patterns exclude if matched not exclude if not matched.
4.0.0
4.0.0
- NEW: Deprecated
WcMatch
class methodskill
andreset
.WcMatch
should be broken with a simplebreak
statement instead. - NEW: Add a new flag
MARK
to forceglob
to return directories with a trailing slash. - NEW: Add
MATCHBASE
that causes glob glob related functions andWcMatch
, when the pattern has no slashes in it, to seek for any file anywhere in the tree with a matching basename. - NEW: Add
NODIR
that causesglob
matchers and crawlers to only match and return files. - NEW: Exclusion patterns (enabled with
NEGATE
) now always enableDOTALL
in the exclusion patterns. They also will match symlinks in**
patterns. Only nonNEGATE
patterns that are paired with aNEGATE
pattern are subject to symlinks and dot rules. Exclusion patterns themselves allow dots and symlinks to make filtering easier. - NEW: Exclusion patterns no longer provide a default inclusion pattern if one is not specified. Exclusion patterns are meant to filter the results of inclusion patterns. You can either use the
SPLIT
flag and provide an inclusion pattern with your default ('default_pattern|!exclusion'), or feed in a list of multiple patterns instead of a single string (['inclusion', '!exclusion']
). If you really need the old behavior, you can use theNEGATEALL
flag which will provide a default inclusion pattern that matches all files. - NEW: Translate now outputs exclusion patterns so that if they match, the file is excluded. This is opposite logic to how it used to be, but is more efficient.
- FIX: An empty pattern in
glob
should not match slashes.
3.0.2
3.0.2
- FIX: Fix an offset issue when processing an absolute path pattern in
glob
on Linux or macOS. - FIX: Fix an issue where the
glob
command would useGLOBSTAR
logic on**
even whenGLOBSTAR
was disabled.
3.0.1
3.0.1
- FIX: In the
WcMatch
class, defer hidden file check until after the file or directory is compared against patterns to potentially avoid calling hidden if the pattern doesn't match. The reducedlstat
calls improve performance.
3.0.0
3.0.0
- NEW:
globsplit
andfnsplit
have been deprecated. Users are encouraged to use the newSPLIT
flag to allow functions to use multiple wildcard paths delimited by|
. - NEW:
globmatch
andglobfilter
will now parse provided paths as real paths if the newREALPATH
flag is set. This has the advantage of allowing the commands to be aware of symlinks and properly apply related logic (whether to follow the links or not). It also helps to clarify ambiguous cases where it isn't clear if a file path references a directory because the trailing slash was omitted. It also allows the command to be aware of Windows drives evaluate the path in proper context compared to the current working directory. - NEW:
WcMatch
class no longer accepts therecursive
orshow_hidden
parameter, instead theRECURSIVE
orHIDDEN
flag must be used. - NEW:
WcMatch
class now can search symlink directories with the newSYMLINK
flag. - NEW:
glob
andiglob
functions now behave like Bash 5.0 in regards to symlinks inGLOBSTAR
(**
).GLOBSTAR
will ignore symlink directories. This affects other functions such asglobmatch
andglobfilter
when theREALPATH
flag is enabled. - NEW: New flag called
FOLLOW
was added to force relatedglob
commands to recognize and follow symlink directories. - FIX: Fix
glob
regression where inverse patterns such as!**/test/**
would allow a directorybase/test
to match when it should have excluded it. - FIX:
glob
should handle root paths (/
) properly, and on Windows, it should assume the drive of the current working directory.
2.2.1
2.2.1
- FIX:
EXTMATCH
/EXTGLOB
should allow literal dots and should not treat dots like sequences do. - FIX: Fix
!(...)
extended match patterns inglob
andglobmatch
so that they properly match.
and..
if their pattern starts with.
. - FIX: Fix
!(...)
extended match patterns so that they handle path separators correctly. - FIX: Patterns such as
?
or[.]
should not trigger matching directories.
and..
inglob
andglobmatch
.
2.2.0
2.2.0
- NEW: Officially support Python 3.8.
2.1.0
2.1.0
- NEW: Deprecate
version
andversion_info
in favor of the more standard__version__
and__version_info__
. - FIX: Fix issue where negated patterns would trigger before end of path.
- FIX: Fix
GLOBSTAR
regular expression pattern issues.