mirror of
https://github.com/nushell/nushell.git
synced 2025-07-01 07:00:37 +02:00
allow tables to have annotations (#9613)
# Description follow up to #8529 and #8914 this works very similarly to record annotations, only difference being that ```sh table<name: string> ^^^^ ^^^^^^ | | | represents the type of the items in that column | represents the column name ``` more info on the syntax can be found [here](https://github.com/nushell/nushell/pull/8914#issue-1672113520) # User-Facing Changes **[BREAKING CHANGE]** this change adds a field to `SyntaxShape::Table` so any plugins that used it will have to update and include the field. though if you are unsure of the type the table expects, `SyntaxShape::Table(vec![])` will suffice
This commit is contained in:
@ -23,6 +23,7 @@ impl Command for SubCommand {
|
||||
// TODO: --convert option should be implemented as `format duration`
|
||||
(Type::String, Type::String),
|
||||
(Type::Duration, Type::String),
|
||||
(Type::Table(vec![]), Type::Table(vec![])),
|
||||
])
|
||||
.named(
|
||||
"convert",
|
||||
|
Reference in New Issue
Block a user