micromatch / glob-fs

file globbing for node.js. speedy and powerful alternative to node-glob. This library is experimental and does not work on windows!
http://jonschlinkert.github.io/glob-fs
MIT License
55 stars 17 forks source link

Problem using brace matcher #6

Open steveluscher opened 8 years ago

steveluscher commented 8 years ago

I hope this is just me not understanding glob syntax. I seem to be able to read test and src separately, but not together, joined in braces.

> var glob = require('glob-fs')();
undefined

> glob.readdirStream('../foopath/test/**').on('data', function(file) { console.log(file.path); }), null;
null
> /Users/steveluscher/.../foopath/test/testOneFile.js
/Users/steveluscher/.../foopath/test/testTwoFile.js

> glob.readdirStream('../foopath/src/**').on('data', function(file) { console.log(file.path); }), null;
null
> /Users/steveluscher/.../foopath/src/srcOneFile.js
/Users/steveluscher/.../foopath/src/srcTwoFile.js

> glob.readdirStream('{../foopath/src,../foopath/test}/**').on('data', function(file) { console.log(file.path); }), null;
null

Note that the same glob pattern used with ls lists all four files:

ls -al {../foopath/src,../foopath/test}/**
jonschlinkert commented 8 years ago

that sounds like a bug. I'll look into it, thanks for reporting

dotnetwise commented 8 years ago

+1

TheMaverickProgrammer commented 8 years ago

+1