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

Please provide pipe functionality #43

Closed
steinemann opened this issue Nov 11, 2021 · 2 comments
Closed

Please provide pipe functionality #43

steinemann opened this issue Nov 11, 2021 · 2 comments

Comments

@steinemann
Copy link

Hi,

I love using xshell and the xtask approach, but what I am completely missing is support for piping commands together.

Please provide a functionality to pipe commands like
cmd!("echo hi") | cmd!("grep i").run()?
or
cmd!("echo hi").pipe("grep i").run()?

Thanks

@azdavis
Copy link
Collaborator

azdavis commented Mar 13, 2022

Piping is out of scope for this project. https://crates.io/crates/duct might have what you're looking for.

@azdavis azdavis closed this as completed Mar 13, 2022
@lukehsiao
Copy link

lukehsiao commented Oct 6, 2022

One workaround if you don't want to use duct can be just calling bash. E.g.

let bash = r#"echo "hi" | grep "hello""#;
cmd!(sh, "bash -c {bash}").run()?;

That might get you by under some constrained conditions.

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