forked from extern/nushell
add any -> record
to metadata
(#9755)
# Description in the help page of `metadata`, there is the following example ```nushell ls | metadata ``` which gives the following error ``` Error: nu::parser::input_type_mismatch × Command does not support table input. ╭─[entry #2:1:1] 1 │ ls | metadata · ────┬─── · ╰── command doesn't support table input ╰──── ``` this PR adds `any -> record` to the signatures of `metadata` to allow the use of that kind of example. # User-Facing Changes `ls | metadata` will work again # Tests + Formatting - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - ⚫ `toolkit test` - ⚫ `toolkit test stdlib` # After Submitting
This commit is contained in:
parent
d104efdf68
commit
693cb5c142
@ -20,7 +20,7 @@ impl Command for Metadata {
|
||||
|
||||
fn signature(&self) -> nu_protocol::Signature {
|
||||
Signature::build("metadata")
|
||||
.input_output_types(vec![(Type::Nothing, Type::Record(vec![]))])
|
||||
.input_output_types(vec![(Type::Any, Type::Record(vec![]))])
|
||||
.allow_variants_without_examples(true)
|
||||
.optional(
|
||||
"expression",
|
||||
|
Loading…
Reference in New Issue
Block a user