Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minimatch doesn't match contents of directories #46

Closed
jonvuri opened this issue Jul 10, 2014 · 1 comment
Closed

minimatch doesn't match contents of directories #46

jonvuri opened this issue Jul 10, 2014 · 1 comment

Comments

@jonvuri
Copy link

jonvuri commented Jul 10, 2014

From eslint/eslint#1069.

Unsure if this is intended or not, so opening this just to make sure it's been considered (couldn't find any tests).

.gitignore will match all of the contents of a directory even without a **glob. The following would all be (mostly) equivalent:

foo/bar
foo/bar/
foo/bar/**

This isn't the case for minimatch. The first two will only match the directory itself, while the last one will match all the contents.

@isaacs
Copy link
Owner

isaacs commented Jul 11, 2014

This module is a parallel to fnmatch(3). If you want something like .gitignore behavior, you probably want fstream-ignore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants