Skip to content

Commit a5b5652

Browse files
authored
docs: fix documentation concerning glob expansion on UNIX (#4869)
1 parent efbb147 commit a5b5652

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/index.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -2257,10 +2257,11 @@ Some shells support recursive matching by using the globstar (`**`) wildcard. Ba
22572257
$ mocha "./spec/**/*.js"
22582258
```
22592259

2260-
[You should _always_ quote your globs in npm scripts][article-globbing]. If you
2261-
use double quotes, it's the shell on UNIX that will expand the glob. On the
2262-
other hand, if you use single quotes, the [`node-glob`][npm-glob] module will
2263-
handle its expansion.
2260+
You should _always_ quote your globs in npm scripts. If you
2261+
use quotes, the [`node-glob`][npm-glob] module will
2262+
handle its expansion. For maximum compatibility,
2263+
surround the entire expression with double quotes and refrain
2264+
from `$`, `"`, `^`, and `\` within your expression.
22642265

22652266
See this [tutorial][gist-globbing-tutorial] on using globs.
22662267

@@ -2352,7 +2353,6 @@ For a running example of Mocha, view [example/tests.html](example/tests.html). F
23522353
or the [source](https://github.com/mochajs/mocha/blob/master/lib/mocha.js).
23532354

23542355
[//]: # 'Cross reference section'
2355-
[article-globbing]: https://medium.com/@jakubsynowiec/you-should-always-quote-your-globs-in-npm-scripts-621887a2a784
23562356
[bash-globbing]: https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html
23572357
[better-assert]: https://github.com/visionmedia/better-assert
23582358
[caniuse-notifications]: https://caniuse.com/#feat=notifications

0 commit comments

Comments
 (0)