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

feat: support stdin and pipe for Child API #1033

Merged
merged 1 commit into from
May 14, 2024
Merged

feat: support stdin and pipe for Child API #1033

merged 1 commit into from
May 14, 2024

Conversation

sxyazi
Copy link
Owner

@sxyazi sxyazi commented May 13, 2024

An implementation of the feature request: #1030

Closes #1030

local echo = Command("echo"):arg("Hello"):stdout(Command.PIPED):spawn()

local rev = Command("rev"):stdin(echo:take_stdout()):stdout(Command.PIPED):output()

ya.err(rev.stdout) -- "olleH\n"

@sxyazi sxyazi merged commit 28dfe72 into main May 14, 2024
5 checks passed
@sxyazi sxyazi deleted the pr-ecdcac66 branch May 14, 2024 14:07
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plugins: Pipe output from one command to stdin of another
1 participant