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

interpret -- as stdin #55

Closed
neonstalwart opened this issue Mar 11, 2013 · 2 comments
Closed

interpret -- as stdin #55

neonstalwart opened this issue Mar 11, 2013 · 2 comments

Comments

@neonstalwart
Copy link

in jshint/jshint#687, there's an interest in being able to use the jshint cli interface by passing -- as a filename and having the input from stdin used as the contents of the file. since jshint uses shelljs i was wondering if it would be possible to add this support to shelljs - it's probably useful to lots of other people who use shelljs too.

i'm not very familiar with shelljs but if someone could give me some guidance on how to approach this, i might take a stab at it.

@nfischer
Copy link
Member

nfischer commented Jan 9, 2016

@neonstalwart Do you mean to modify shjs to allow the equivalent of this?

$ echo 'echo foo' | bash

If so, I think this will work as required:

$ echo "require('shelljs/global'); echo('foo');" | node

I'm closing this, since this seems to solve the issue. If this isn't sufficient, let me know, and we can reopen.

@nfischer nfischer closed this as completed Jan 9, 2016
@neonstalwart
Copy link
Author

I'm not sure if it's equivalent to what I meant but I've moved on quite a
lot since the time I opened this and no longer care.

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

No branches or pull requests

3 participants