forked from extern/nushell
Add cell paths for streams
This commit is contained in:
@ -30,7 +30,7 @@ impl Command for Each {
|
||||
let context = context.clone();
|
||||
|
||||
match input {
|
||||
Value::Range { val, .. } => Ok(Value::ValueStream {
|
||||
Value::Range { val, .. } => Ok(Value::Stream {
|
||||
stream: val
|
||||
.into_iter()
|
||||
.map(move |x| {
|
||||
@ -52,7 +52,7 @@ impl Command for Each {
|
||||
.into_value_stream(),
|
||||
span: call.head,
|
||||
}),
|
||||
Value::List { vals: val, .. } => Ok(Value::ValueStream {
|
||||
Value::List { vals: val, .. } => Ok(Value::Stream {
|
||||
stream: val
|
||||
.into_iter()
|
||||
.map(move |x| {
|
||||
@ -74,7 +74,7 @@ impl Command for Each {
|
||||
.into_value_stream(),
|
||||
span: call.head,
|
||||
}),
|
||||
Value::ValueStream { stream, .. } => Ok(Value::ValueStream {
|
||||
Value::Stream { stream, .. } => Ok(Value::Stream {
|
||||
stream: stream
|
||||
.map(move |x| {
|
||||
let engine_state = context.engine_state.borrow();
|
||||
|
@ -53,7 +53,7 @@ impl Command for For {
|
||||
let context = context.clone();
|
||||
|
||||
match values {
|
||||
Value::ValueStream { stream, .. } => Ok(Value::ValueStream {
|
||||
Value::Stream { stream, .. } => Ok(Value::Stream {
|
||||
stream: stream
|
||||
.map(move |x| {
|
||||
let engine_state = context.engine_state.borrow();
|
||||
|
@ -32,7 +32,7 @@ impl Command for Length {
|
||||
span: call.head,
|
||||
})
|
||||
}
|
||||
Value::ValueStream { stream, .. } => {
|
||||
Value::Stream { stream, .. } => {
|
||||
let length = stream.count();
|
||||
|
||||
Ok(Value::Int {
|
||||
|
Reference in New Issue
Block a user