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

Add the ability to escape commands (or directory names) with a slash #10

Merged
merged 5 commits into from
Nov 15, 2015

Conversation

msikma
Copy link
Contributor

@msikma msikma commented Jul 26, 2015

Currently it's not possible (to my knowledge?) to run a command that contains a space. For example:

$ concurrent "/Users/msikma/Public projects/react-redux-dada/run.js --argument"

This will fail because everything to the left of the space is considered to be the command's full path, and everything on the right is the arguments. The intent is to call everything inside the quotation marks as a command with no arguments.

Normally, in a terminal, you'd fix this by escaping the space in the path, but Concurrently splits the command by space. This PR replaces that split with one that takes escape slashes into account. Making the following possible:

$ concurrent "/Users/msikma/Public\ projects/react-redux-dada/run.js --argument"

This passes all tests and handles cases with and without escaped path, with and without arguments.

kimmobrunfeldt added a commit that referenced this pull request Nov 15, 2015
Add the ability to escape commands (or directory names) with a slash
@kimmobrunfeldt kimmobrunfeldt merged commit 2d28b81 into open-cli-tools:master Nov 15, 2015
@kimmobrunfeldt
Copy link
Contributor

Now merged and released, sorry that it took so long. https://github.com/kimmobrunfeldt/concurrently/releases/tag/1.0.0

@msikma
Copy link
Contributor Author

msikma commented Nov 15, 2015

Very cool! I had forgotten about this :) 👍

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 this pull request may close these issues.

2 participants