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

Directories can contain square brakets #50

Closed
floatdrop opened this issue Aug 13, 2014 · 9 comments
Closed

Directories can contain square brakets #50

floatdrop opened this issue Aug 13, 2014 · 9 comments

Comments

@floatdrop
Copy link

This is continuation of issue, started in gulp-watch. Minimatch translates [ and ] as class pattern, but in fact you can execute mkdir such[dir] and create folder with name that includes brackets. Seems like minimatch is lacking of ability to escape square brackets, because writing \[ does not help.

@yocontra
Copy link

yocontra commented Sep 1, 2014

👍 You should be able to escape any minimatch special characters

@tunnckoCore
Copy link

+1 Mm, yea. With single \[ doesn't help, with \\[ also, because splits by \\ for windows paths...

@ruifortes
Copy link

+1

@phated
Copy link

phated commented Apr 1, 2015

@isaacs I notice some commits that relate to this. Is it fixed?

@tunnckoCore
Copy link

@phated yea, it seems it is fixed and work with double slash for escaping. cuz yesterday i tested it gulpjs/gulp#1027
but yea, some response also would be good.

@srcspider
Copy link

@phated assuming this is the same that gulp is currently using; it's not fixed in gulp 3.9.0

@phated
Copy link

phated commented Apr 5, 2016

Sorry, wrong thread :/

@ericsciple
Copy link

fyi - i've found [[] works as a substitute for escaping [ on Windows

@isaacs
Copy link
Owner

isaacs commented Feb 15, 2022

In latest 3.0, you can escape and set allowWindowsEscape:true to the options.

In v5 and up, \ is no longer treated as a path separator in patterns, so you must use / in patterns on windows, and can escape to your hearts' delight.

@isaacs isaacs closed this as completed Feb 15, 2022
This issue was closed.
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

Successfully merging a pull request may close this issue.

8 participants