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

Commands should accept stdin #80

Closed
nfischer opened this issue Oct 10, 2016 · 1 comment
Closed

Commands should accept stdin #80

nfischer opened this issue Oct 10, 2016 · 1 comment
Assignees
Milestone

Comments

@nfischer
Copy link
Member

Currently, it isn't possible to do something like cat file.txt | shx grep 'foo'. It looks like shx isn't passing stdin along to the ShellJS command (although most commands actually support this).

This is currently blocking my work on shelljs/shelljs#525 (I'd like to replace .exec('grep...') with .exec('shx grep...')).

This should be an easy fix, if someone wants to take it up. Looks like we'll only have to change these lines to call the shelljs function with a different this parameter (see the piping docs).

@levithomason
Copy link
Contributor

With my plate, it will be while before this comes to the front of line for me. Whoever is able to take it I say go for it.

@nfischer nfischer modified the milestone: 0.2.0 Oct 17, 2016
@nfischer nfischer modified the milestone: 0.2.0 Oct 24, 2016
nfischer added a commit that referenced this issue Oct 24, 2016
Read all of stdin and pass it to the underlying ShellJS command. This is also
adds support for mocking stdin during tests, and refactors the mock utilities.

Fixes #80
@nfischer nfischer self-assigned this Oct 24, 2016
nfischer added a commit that referenced this issue Oct 30, 2016
Read all of stdin and pass it to the underlying ShellJS command. This is also
adds support for mocking stdin during tests, and refactors the mock utilities.

Fixes #80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants