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

Documentation around glob patterns and shell expansion #1115

Closed
jsdevel opened this issue Jan 16, 2014 · 8 comments
Closed

Documentation around glob patterns and shell expansion #1115

jsdevel opened this issue Jan 16, 2014 · 8 comments
Labels
area: documentation anything involving docs or mochajs.org

Comments

@jsdevel
Copy link
Contributor

jsdevel commented Jan 16, 2014

Not sure if it is needed, but it may be worth noting that due to shell expansion, glob patterns should be wrapped in single quotes on unix shells.

mocha -w -r should 'test/**/*.js'

Using that would render the --recursive flag useless.

@mrjoelkemp
Copy link
Contributor

Similar to #1175.

I agree that this should be noted. Seems like it should be added in the man page and on the site's rendering of the man page.

I'm not sure what's the standard way of noting this precondition of globbing.

Would it be like:

Usage: mocha [debug] [options] [files | 'glob']

or

Usage: mocha [debug] [options] [files] ['glob']

or should it be a separate section "Notes" that contains the hint to quote the glob?

@thom4parisot
Copy link

Good catch!

@alexgorbatchev
Copy link

💯 👍 got bitten by this! thank you!

@jsdevel
Copy link
Contributor Author

jsdevel commented Jul 3, 2014

Some interesting notes on expansion: http://www.gnu.org/software/bash/manual/bashref.html#Filename-Expansion

@jbnicolai
Copy link

Anyone willing to create a PR for this?

@boneskull
Copy link
Contributor

continue in mochajs/old-mochajs-site#8

@plroebuck
Copy link
Contributor

Is this done (from 3+ years ago)?

@boneskull
Copy link
Contributor

nope. see #3136

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: documentation anything involving docs or mochajs.org
Projects
None yet
Development

No branches or pull requests

7 participants