mirror of
https://github.com/nushell/nushell.git
synced 2025-02-22 21:41:26 +01:00
Handle custom values in describe command (#5248)
This commit is contained in:
parent
b501db673a
commit
7e97be1dd4
@ -35,8 +35,13 @@ impl Command for Describe {
|
|||||||
))
|
))
|
||||||
} else {
|
} else {
|
||||||
let value = input.into_value(call.head);
|
let value = input.into_value(call.head);
|
||||||
|
let description = match value {
|
||||||
|
Value::CustomValue { val, .. } => val.value_string(),
|
||||||
|
_ => value.get_type().to_string(),
|
||||||
|
};
|
||||||
|
|
||||||
Ok(Value::String {
|
Ok(Value::String {
|
||||||
val: value.get_type().to_string(),
|
val: description,
|
||||||
span: head,
|
span: head,
|
||||||
}
|
}
|
||||||
.into_pipeline_data())
|
.into_pipeline_data())
|
||||||
|
Loading…
Reference in New Issue
Block a user