mirror of
https://github.com/nushell/nushell.git
synced 2024-12-24 16:09:11 +01:00
change describe so it doesn't output colored strings (#3832)
This commit is contained in:
parent
2e24de7f47
commit
27f1e7b60c
@ -31,7 +31,7 @@ pub fn describe(args: CommandArgs) -> Result<ActionStream, ShellError> {
|
||||
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)),
|
||||
)
|
||||
|
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user