Display range values better (#5487)

This commit is contained in:
Reilly Wood 2022-05-09 10:18:37 -07:00 committed by GitHub
parent 8d8f25b210
commit 23b467061b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -153,11 +153,15 @@ impl Command for Table {
let base_pipeline = val.to_base_value(span)?.into_pipeline_data();
self.run(engine_state, stack, call, base_pipeline)
}
PipelineData::Value(x @ Value::Range { .. }, ..) => Ok(Value::String {
val: x.into_string("", config),
span: call.head,
}
.into_pipeline_data()),
PipelineData::Value(Value::Range { val, .. }, metadata) => handle_row_stream(
engine_state,
stack,
ListStream::from_stream(val.into_range_iter(ctrlc.clone())?, ctrlc.clone()),
call,
row_offset,
ctrlc,
metadata,
),
x => Ok(x),
}
}