From 41834d16d683d03c81f7a2c2d266610e4425e846 Mon Sep 17 00:00:00 2001 From: JT Date: Wed, 26 May 2021 17:58:32 +1200 Subject: [PATCH] Allow aliases to expand and ignore painting outside of lines (#3492) --- crates/nu-engine/src/from_value.rs | 4 ++++ crates/nu-engine/src/shell/painter.rs | 4 +++- tests/shell/pipeline/commands/internal.rs | 12 ++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/crates/nu-engine/src/from_value.rs b/crates/nu-engine/src/from_value.rs index 396ebc4f70..9341eb8974 100644 --- a/crates/nu-engine/src/from_value.rs +++ b/crates/nu-engine/src/from_value.rs @@ -374,6 +374,10 @@ impl FromValue for Vec { value: UntaggedValue::Table(t), .. } => Ok(t.clone()), + Value { + value: UntaggedValue::Row(_), + .. + } => Ok(vec![v.clone()]), Value { tag, .. } => Err(ShellError::labeled_error( "Can't convert to table", "can't convert to table", diff --git a/crates/nu-engine/src/shell/painter.rs b/crates/nu-engine/src/shell/painter.rs index a43f386879..89f98088d5 100644 --- a/crates/nu-engine/src/shell/painter.rs +++ b/crates/nu-engine/src/shell/painter.rs @@ -46,7 +46,9 @@ impl Painter { fn paint(&mut self, styled_span: &Spanned