Open ssbarnea opened 6 years ago
We use minimatch for glob matching. I am unaware if minimatch offers what you are looking for.
Had the same question. This might be of some help:
minimatch('basedir/projectcore/test/script.js', 'basedir/project+(core|)/**/*.js'); // true
minimatch('basedir/projectcore/test/script.js', '**/project+(core|)/**/*.js'); // true
minimatch('basedir/projectcore/test/script.js', '**/project*/**/*.js'); // true
minimatch('basedir/project/test/script.js', 'basedir/project+(core|)/**/*.js'); // true
// globstar not allowed in combination with string
minimatch('basedir/projectcore/test/script.js', '**/project*/**.js'); // false
minimatch('basedir/projectcore/test/script.js', '**/projectcore/**.js'); // false
This probably explains: https://github.com/isaacs/minimatch/issues/67
Seems it won't be fixed, unless someone comes up with a good PR. It looks like yarn has moved to micromatch for this specific reason: https://github.com/yarnpkg/yarn/pull/3339 - although what other issues that might introduce I have no clue about.
Prerequisites
Description
As a power user I expect to be able to specify complex patterns for matching file/directories in Atom.
Steps to Reproduce
I tried
foo/**/bar/**
andfoo/.*/bar/.*
and I realised that none of them work.Expected behavior:
Be able to respect the java style globing pattern which allows the first example. Have it documented in the sample text so user will learn how to use without having to read the documentation.
Actual behavior: Anything after ** is ignored so more files are found than expected.
Reproduces how often: Always
Versions
Additional Information
I do not have a strong preference upon the syntax being supported, which ever is easier to implement but the default example text should contain an example that explains it.