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

Feature request: Pipe operator (function) #50

Open
omani opened this issue Aug 16, 2017 · 2 comments
Open

Feature request: Pipe operator (function) #50

omani opened this issue Aug 16, 2017 · 2 comments

Comments

@omani
Copy link
Contributor

omani commented Aug 16, 2017

hi,

I am thinking of a pipe operator in ishell. so you could pipe through another function:

>>> print "hello" | func1

stdout (or return of the print function) is piped into func1 as stdin (or input arguments).

is this possible or any plans to implement this?

@abiosoft
Copy link
Owner

Yeah, I've thought of this. But I can't give an ETA on when it will be added.

@mvdan
Copy link

mvdan commented Aug 17, 2017

FYI, I have a fairly complete shell package over at https://github.com/mvdan/sh

This includes a parser with Bash support, so you would get all of the features including pipes.

One thing that is missing is parsing statements one at a time, though, which is needed for an interactive shell. It's something that I'm currently working on and will release shortly after 2.0.

It's also got an interpreter, so you might be able to reuse parts of it :) It's written in a way that it can be incrementally fed commands. And it should become more configurable once mvdan/sh#147 is implemented.

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

3 participants