forked from extern/nushell
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 {
|
||||
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 {
|
||||
val: value.get_type().to_string(),
|
||||
val: description,
|
||||
span: head,
|
||||
}
|
||||
.into_pipeline_data())
|
||||
|
Loading…
Reference in New Issue
Block a user