Pipeline sink refactor (#1359)

* Refactor pipeline ahead of block changes. Add '-c' commandline option

* Update pipelining an error value

* Fmt

* Clippy

* Add stdin redirect for -c flag

* Add stdin redirect for -c flag
This commit is contained in:
Jonathan Turner
2020-02-08 18:24:33 -08:00
committed by GitHub
parent 3687603799
commit 5f4fae5b06
11 changed files with 221 additions and 81 deletions

View File

@ -13,6 +13,13 @@ fn main() -> Result<(), Box<dyn Error>> {
.possible_values(&["error", "warn", "info", "debug", "trace"])
.takes_value(true),
)
.arg(
Arg::with_name("commands")
.short("c")
.long("commands")
.multiple(false)
.takes_value(true),
)
.arg(
Arg::with_name("develop")
.long("develop")
@ -63,6 +70,16 @@ fn main() -> Result<(), Box<dyn Error>> {
}
}
match matches.values_of("commands") {
None => {}
Some(values) => {
for item in values {
futures::executor::block_on(nu::run_pipeline_standalone(item.into()))?;
}
return Ok(());
}
}
builder.try_init()?;
println!(