thoughtbot / cocaine

A small library for doing (command) lines.
https://robots.thoughtbot.com
Other
785 stars 55 forks source link

Cannot open command as pipe #90

Closed cmouse closed 7 years ago

cmouse commented 9 years ago

There does not seem to be able to execute command as pipe source or sink. Can this feature to be added?

Idea would be that you could get a file handle that you could for reading or writing.

jyurek commented 9 years ago

This would necessarily only be available on Popen because the others don't really have a way to attach stdin to be a sink. I'm not sure there's a good way to add this in the general case.

cmouse commented 9 years ago

I can probably work around it, but it does pose a problem if you are expecting lots of data from the command.

jyurek commented 9 years ago

It'd be interesting to try to get this in a way where you can actually pipe. I'm going to leave this open as a reminder to try it out. Please forgive me if it takes a while, though. :)

jyurek commented 7 years ago

Yeah, this doesn't seem to be an in-demand feature enough to justify work, since, you know, it's been around for a year and a half and I haven't even tried. If anyone's seeing this and wants to try, I'm all ears, though.