diff --git a/crates/nu-command/src/commands/core_commands/describe.rs b/crates/nu-command/src/commands/core_commands/describe.rs index 9393753679..fa48a9ee94 100644 --- a/crates/nu-command/src/commands/core_commands/describe.rs +++ b/crates/nu-command/src/commands/core_commands/describe.rs @@ -31,7 +31,7 @@ pub fn describe(args: CommandArgs) -> Result { Ok(args .input .map(|row| { - let name = value::format_type(&row, 100); + let name = value::plain_type(&row, 100); ReturnSuccess::value( UntaggedValue::string(name).into_value(Tag::unknown_anchor(row.tag.span)), ) diff --git a/crates/nu-data/src/value.rs b/crates/nu-data/src/value.rs index 2695b36701..4074bd5d89 100644 --- a/crates/nu-data/src/value.rs +++ b/crates/nu-data/src/value.rs @@ -537,6 +537,10 @@ pub fn compare_values( Ok(result) } +pub fn plain_type<'a>(value: impl Into<&'a UntaggedValue>, width: usize) -> String { + Type::from_value(value.into()).plain_string(width) +} + pub fn format_type<'a>(value: impl Into<&'a UntaggedValue>, width: usize) -> String { Type::from_value(value.into()).colored_string(width) }