Skip to content

Commit 0be4cfb

Browse files
committedSep 26, 2024·
Update some documentation related to recent changes
1 parent 2c5b30b commit 0be4cfb

File tree

3 files changed

+24
-19
lines changed

3 files changed

+24
-19
lines changed
 

‎README.md

+13-12
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,19 @@ is found where Wildcard Match seems to deviate in an illogical way, we'd love to
3030

3131
A quick overview of Wildcard Match's Features:
3232

33-
- Provides an interface comparable to Python's builtin in `fnmatch`, `glob`, and `pathlib`.
34-
- Allows for a much more configurable experience when matching or globbing with many more features.
35-
- Adds support for `**` in glob.
36-
- Adds support for escaping characters with `\`.
37-
- Add support for POSIX style character classes inside sequences: `[[:alnum:]]`, etc. The `C` locale is used.
38-
- Adds support for brace expansion: `a{b,{c,d}}` --> `ab ac ad`.
39-
- Adds support for expanding `~` or `~username` to the appropriate user path.
40-
- Adds support for extended match patterns: `@(...)`, `+(...)`, `*(...)`, `?(...)`, and `!(...)`.
41-
- Adds ability to match path names via the path centric `globmatch`.
42-
- Provides a `pathlib` variant that uses Wildcard Match's `glob` library instead of Python's default.
43-
- Provides an alternative file crawler called `wcmatch`.
44-
- And more...
33+
- Provides an interface comparable to Python's builtin in `fnmatch`, `glob`, and `pathlib`.
34+
- Allows for a much more configurable experience when matching or globbing with many more features.
35+
- Adds support for `**` in glob.
36+
- Adds support for Zsh style `***` recursive glob for symlinks.
37+
- Adds support for escaping characters with `\`.
38+
- Add support for POSIX style character classes inside sequences: `[[:alnum:]]`, etc. The `C` locale is used.
39+
- Adds support for brace expansion: `a{b,{c,d}}` --> `ab ac ad`.
40+
- Adds support for expanding `~` or `~username` to the appropriate user path.
41+
- Adds support for extended match patterns: `@(...)`, `+(...)`, `*(...)`, `?(...)`, and `!(...)`.
42+
- Adds ability to match path names via the path centric `globmatch`.
43+
- Provides a `pathlib` variant that uses Wildcard Match's `glob` library instead of Python's default.
44+
- Provides an alternative file crawler called `wcmatch`.
45+
- And more...
4546

4647
## Installation
4748

‎docs/src/markdown/index.md

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ A quick overview of Wildcard Match's Features:
2828
[`pathlib`][pathlib].
2929
- Allows for a much more configurable experience when matching or globbing with many more features.
3030
- Adds support for `**` in glob.
31+
- Adds support for Zsh style `***` recursive glob for symlinks.
3132
- Adds support for escaping characters with `\`.
3233
- Add support for POSIX style character classes inside sequences: `[[:alnum:]]`, etc. The `C` locale is used.
3334
- Adds support for brace expansion: `a{b,{c,d}}` --> `ab ac ad`.

‎docs/src/markdown/pathlib.md

+10-7
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@ matching:
4747
- [`glob`](#glob), [`rglob`](#rglob), and [`match`](#match) do not enable [`GLOBSTAR`](#globstar)
4848
or [`DOTGLOB`](#dotglob) by default. These flags must be passed in to take advantage of this functionality.
4949

50-
- A [`globmatch`](#globmatch) function has been added to `PurePath` classes (and `Path` classes which are
51-
derived from `PurePath`) which is like [`match`](#match) except without the right to left behavior. See
52-
[`match`](#match) and [`globmatch`](purepathglobmatch) for more information.
50+
- A [`globmatch`](#globmatch) function has been added to `PurePath` classes (and `Path` classes which are derived from
51+
`PurePath`) which is like [`match`](#match) except performs a "full" match. Python 3.13 added a similar
52+
function called [`full_match`](#full_match) which came long after our [`globmatch`](#globmatch) support was added.
53+
In recent versions we've also added [`full_match`](#full_match) as an alias to our [`globmatch`](#globmatch)
54+
function. See [`match`](#match), [`globmatch`](#globmatch), and [`full_match`](#full_match) for more information.
5355

5456
- If file searching methods ([`glob`](#glob) and [`rglob`](#rglob)) are given multiple patterns, they will
5557
ensure duplicate results are filtered out. This only occurs when more than one inclusive pattern is given, or a
@@ -109,7 +111,7 @@ matching:
109111
110112
- [`rglob`](#rglob) will exhibit the same *recursive* behavior.
111113
112-
- [`match`](#match) will exhibit the same right to left behavior.
114+
- [`match`](#match) will match using the same *recursive* behavior as [`rglob`](#rglob).
113115
114116
## Classes
115117
@@ -250,9 +252,10 @@ limit](#multi-pattern-limits). Exclusion patterns can be specified via the `excl
250252
a list of patterns. It will return a boolean indicating whether the object's file path was matched by the
251253
pattern(s).
252254

253-
`match` mimics Python's `pathlib` version of `match`. Python's `match` uses a right to left evaluation. Wildcard Match
254-
emulates this behavior as well. What this means is that when provided with a path `some/path/name`, the patterns `name`,
255-
`path/name` and `some/path/name` will all match. Essentially, it matches what [`rglob`](#rglob) returns.
255+
`match` mimics Python's `pathlib` version of `match`. Python's `match` uses a right to left evaluation that behaves
256+
like [`rglob`](#rglob) but as a matcher instead of a globbing function. Wildcard Match emulates this behavior as well.
257+
What this means is that when provided with a path `some/path/name`, the patterns `name`, `path/name` and `some/path/name`
258+
will all match. Essentially, it matches what [`rglob`](#rglob) returns.
256259

257260
`match` does not access the filesystem, but you can force the path to access the filesystem if you give it the
258261
[`REALPATH`](#realpath) flag. We do not restrict this, but we do not enable it by default.

0 commit comments

Comments
 (0)
Please sign in to comment.