Skip to content

Differences from other tools ​

This page compares globstar with the tools the spec measures against: Bash, picomatch, globset (Rust), fast-glob (the npm walker and the Rust crate, which differ), and doublestar (Go). If you move patterns from one of them to globstar, check the rows below first.

What the other columns mean

Every cell for another tool was measured on 2026-10-16, the same runs as GLOB_SPEC Appendix A: Bash 5.2.37, picomatch 4.0.7, globset 0.4.20, fast-glob 3.3.3 from npm (it matches through micromatch and picomatch 2), the fast-glob crate 1.1.2 and doublestar v4.10.3. Windows cells come from a simulated platform, and tools change between versions. The globstar column is checked against @globstar/core, and each section shows the examples. The comparison does not include minimatch or gitignore. For every case the libraries' own test suites assert, and where globstar answers differently, see fixtures/ecosystem/.

partial is conditional, and the cell says how; n/a does not apply to that tool. ¹ Measured on Unix only.

Options ​

BehaviorglobstarBashpicomatchglobsetfast-glob (npm)fast-glob (crate)doublestar
dot defaulttrue (matcher) / false (walker)falsefalsetrue (no concept)falsetrue (no concept)true (Glob: WithNoHidden())
Case-insensitiveASCII only, default falseshopt nocaseglobnocase optioncase_insensitive buildercaseSensitiveMatch: falsenoWithCaseInsensitive() (Glob only), Unicode

In globstar:

PatternPathOptionsMatch?
*.envyes
*.envdot: falseno
*.tsMAIN.TScaseInsensitive: trueyes
café.txtCAFÉ.txtcaseInsensitive: trueno

The matcher defaults to dot: true, and the walkers default to dot: false. Case folding covers ASCII letters only. See How a path is matched.

The ** wildcard ​

BehaviorglobstarBashpicomatchglobsetfast-glob (npm)fast-glob (crate)doublestar
** must own a segmentenforcedyesyesyes (with literal_separator)yesyesyes
a/** matches anopartial (lists a/)yes (no with strictSlashes)nopartial (walker: no; matcher: yes)noyes
** in braces judged on the expansionyesyes (expands first)no (branch-local .*)noyes (expands first)nopartial (not **{/a,b})
** in a single-branch brace {**}degrades to *degrades to *keeps globstara group; ** acts as *keeps globstara group (= **)a group (= **)
**/X matches the absolute /a/Xyesn/ayesyesn/a (walker)yesyes

In globstar:

PatternPathMatch?Why
src/a**b.tssrc/ax/yb.tsno** is not a whole name here, so it acts as *
a/**anoa/** needs the a/ prefix
a/**a/yesa/ plus nothing
a{**,x}bay/zbnothe expansion a**b has no whole-name **
{**,x}/bbyesthe expansion **/b keeps a real **
{**}{a}yesone branch, so the braces are literal and ** is *
{**}{a/b}nosame reason: * does not cross /
**/*.ts/a/b.tsyesa leading **/ also accepts absolute paths

A brace means "any one of these". globstar judges each ** as if the brace were already expanded, so the text around it in the expansion decides whether it is a real **. To match a directory and everything below it, write {a,a/**}. See The ** wildcard and Brace expansion.

Character classes ​

BehaviorglobstarBashpicomatchglobsetfast-glob (npm)fast-glob (crate)doublestar
POSIX character classesnoyesyesnoyesnono
[/] inside a classparse errorliteralpartial (/ or the literal text)matches /never matchesnever matchespartial (Match: /; Glob: error)
POSIX first-] ruleyesyesyesyesyesyesno (error)
[!a] same as [^a]yes (both negate)yesno (only [^a]; yes with posix)yesyesyesyes

In globstar:

PatternPathMatch?
[[:alpha:]]ano
[/]error: UnterminatedClass
[]a]]yes
[!a].tsb.tsyes
[!a].tsa.tsno

A class can never hold /, so [/] fails to compile instead of silently matching nothing. A ] right after [, [! or [^ is a member, not the end. See Character classes.

Braces ​

BehaviorglobstarBashpicomatchglobsetfast-glob (npm)fast-glob (crate)doublestar
Brace ranges {1..10}noyesyesnoyesnono
Brace nesting≤ 32yesyesyesyes≤ 10yes

In globstar:

PatternPathMatch?
file{1..3}.txtfile2.txtno
file{1..3}.txtfile{1..3}.txtyes
file{1,2,3}.txtfile2.txtyes

There are no ranges. {1..3} has no comma, so it is a one-branch brace and stays literal text. List the values instead. Nesting deeper than 32 levels is a BraceNestingTooDeep error, see Errors and limits.

Other syntax ​

BehaviorglobstarBashpicomatchglobsetfast-glob (npm)fast-glob (crate)doublestar
Extglobsno (literal)yes (shopt)yesnoyesnono
Leading-! negationyesn/ayesno (literal)yes (an ignore pattern)yesno (literal)
/ required in patternsyesn/ayespartialyesyespartial (PathMatch)
\ is always the escapeyesyesyespartialyesyes ¹partial (PathMatch)
Stray ], }, )literalliteralliteral} is an errorliteralliteralpartial (}: Glob error)
Unclosed constructsparse errorliteralpartialerrorpartial (no error)no match (validate() errors)error

In globstar:

PatternPathMatch?
@(a|b).tsa.tsno
@(a|b).ts@(a|b).tsyes
!*.test.tsa.tsyes
src\main.tssrc/main.tsno
\*.md*.mdyes
\*.mda.mdno
a]ba]byes
file(1).txtfile(1).txtyes
{a,berror: UnterminatedBrace
[abcerror: UnterminatedClass

Extglob syntax such as @(a|b) is plain text. In a pattern, / is the only separator and \ always escapes the next character, so src\main.ts means srcmain.ts. An unclosed [ or { is a hard error, never a silent fallback to literal text. See Pattern syntax.

Paths and directories ​

BehaviorglobstarBashpicomatchglobsetfast-glob (npm)fast-glob (crate)doublestar
\ in a path is a separatorplatform-conditionalnopartial (windows option)platformn/a (walker)platform ¹platform (PathMatch)
match_dir APIyes (first-class)n/anonononono
* and ** match . and .. (dot on)yesnonoyesnoyesyes

In globstar:

CallResult
compileMatcher('src/*.ts').match('src\\main.ts')false on macOS / Linux, true on Windows
compileMatcher('src/**/*.ts').matchDir('src')DirMatch.Descend
compileMatcher('src/**/*.ts').matchDir('tests')DirMatch.Pruned

With dot: true, the matcher's default, * and ** also match the names . and .., so public/** matches public/../secret.txt; picomatch never does. Normalize a path from outside before you match it. The walkers never see such names.

A \ in a path counts as a separator only on Windows. matchDir tells a walker whether a directory can hold matches, so it can skip whole subtrees. See How a path is matched and Directory matching.

Summary ​

Of these tools, picomatch is the closest. globstar is stricter about input (patterns must use /), treats directory matching as a first-class operation, and is stricter about syntax errors: an unclosed class or brace is always an error, never silently turned into literal text.

Spec: GLOB_SPEC Appendix A

Released under the MIT License.