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

Process parses command #7452

Merged
merged 1 commit into from Dec 11, 2018
Merged

Process parses command #7452

merged 1 commit into from Dec 11, 2018

Conversation

@som-snytt
Copy link
Contributor

som-snytt commented Nov 22, 2018

Pasted parser and test into sys.process.

Did not cope with comment about backslash on Windows.

Fixes scala/bug#7947

@scala-jenkins scala-jenkins added this to the 2.13.0-RC1 milestone Nov 22, 2018
@SethTisue

This comment has been minimized.

Copy link
Member

SethTisue commented Dec 4, 2018

Runtime.exec splits on spaces somehow, can't we call the same code?

@som-snytt

This comment has been minimized.

Copy link
Contributor Author

som-snytt commented Dec 5, 2018

No. It uses StringTokenizer, which is essentially deprecated as useless. The point here is to offer quoting, which is what the people (quite reasonably) want.

Another question is whether some such functionality should be promoted to util, but that is out of scope.


/** A simple enough command line parser.
*/
private[scala] object Parser {

This comment has been minimized.

Copy link
@hepin1989

hepin1989 Dec 5, 2018

Contributor

grate.

@lrytz
lrytz approved these changes Dec 11, 2018
@lrytz lrytz merged commit 6fe5f4f into scala:2.13.x Dec 11, 2018
3 checks passed
3 checks passed
cla @som-snytt signed the Scala CLA. Thanks!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
validate-main [5685] SUCCESS. Took 35 min.
Details
@som-snytt som-snytt deleted the som-snytt:issue/7947 branch Dec 11, 2018
@som-snytt

This comment has been minimized.

Copy link
Contributor Author

som-snytt commented Dec 11, 2018

The scaladoc never mentioned that it splits the string.

@som-snytt

This comment has been minimized.

Copy link
Contributor Author

som-snytt commented Dec 17, 2018

Just updated jline3. The last commit:

Fix quote parsing and escaping, fixes #331
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.