From 0b2d3ba2b00522ecba29704a9713d443981b02df Mon Sep 17 00:00:00 2001 From: isaacs Date: Tue, 15 Feb 2022 10:02:02 -0800 Subject: [PATCH] mention fnmatch(3) in impl comparison --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 8c00cb02..7c55391b 100644 --- a/README.md +++ b/README.md @@ -236,3 +236,9 @@ other interpretation of the glob pattern. Thus, a pattern like `+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded **first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are checked for validity. Since those two are valid, matching proceeds. + +Note that `fnmatch(3)` in libc is an extremely naive string comparison +matcher, which does not do anything special for slashes. This library is +designed to be used in glob searching and file walkers, and so it does do +special things with `/`. Thus, `foo*` will not match `foo/bar` in this +library, even though it would in `fnmatch(3)`.