run ensure_flag_arg_type for short flag values (#14074)

Closes #13654

# User-Facing Changes

- Short flags are now fully type-checked,
  including null and record signatures for literal arguments:

```nushell
def test [-v: record<l: int>] {};
test -v null # error
test -v {l: ""} # error

def test2 [-v: int] {};
let v = ""
test2 -v $v # error
```

- `polars unpivot` `--index`/`--on` and `into value --columns`
now accept `list` values
This commit is contained in:
Solomon
2024-10-17 02:25:17 +00:00
committed by sholderbach
parent 3af575cce7
commit b0427ca9ff
4 changed files with 28 additions and 19 deletions

View File

@ -18,7 +18,7 @@ impl Command for IntoValue {
.input_output_types(vec![(Type::table(), Type::table())])
.named(
"columns",
SyntaxShape::Table(vec![]),
SyntaxShape::List(Box::new(SyntaxShape::Any)),
"list of columns to update",
Some('c'),
)