mirror of
https://github.com/nushell/nushell.git
synced 2025-04-08 20:08:20 +02: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
|
Ok(args
|
||||||
.input
|
.input
|
||||||
.map(|row| {
|
.map(|row| {
|
||||||
let name = value::format_type(&row, 100);
|
let name = value::plain_type(&row, 100);
|
||||||
ReturnSuccess::value(
|
ReturnSuccess::value(
|
||||||
UntaggedValue::string(name).into_value(Tag::unknown_anchor(row.tag.span)),
|
UntaggedValue::string(name).into_value(Tag::unknown_anchor(row.tag.span)),
|
||||||
)
|
)
|
||||||
|
@ -537,6 +537,10 @@ pub fn compare_values(
|
|||||||
Ok(result)
|
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 {
|
pub fn format_type<'a>(value: impl Into<&'a UntaggedValue>, width: usize) -> String {
|
||||||
Type::from_value(value.into()).colored_string(width)
|
Type::from_value(value.into()).colored_string(width)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user