forked from extern/nushell
Table help rendering (#13182)
# Description Mostly fixes #13149 with much of the credit to @fdncred. This PR runs `table --expand` against `help` example results. This is essentially the same fix that #13146 was for `std help`. It also changes the shape of the result for the `table --expand` example, as it was hardcoded wrong. ~Still needed is a fix for the `table --collapse` example.~ Note that this is also still a bug in `std help` that I didn't noticed before. # User-Facing Changes Certain tables are now rendered correctly in the help examples for: * `table` * `zip` * `flatten` * And almost certainly others # Tests + Formatting - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🟢 `toolkit test` - 🟢 `toolkit test stdlib` # After Submitting --------- Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
This commit is contained in:
@ -170,7 +170,10 @@ impl Command for Table {
|
||||
}),
|
||||
Value::test_record(record! {
|
||||
"a" => Value::test_int(3),
|
||||
"b" => Value::test_int(4),
|
||||
"b" => Value::test_list(vec![
|
||||
Value::test_int(4),
|
||||
Value::test_int(4),
|
||||
])
|
||||
}),
|
||||
])),
|
||||
},
|
||||
@ -184,7 +187,10 @@ impl Command for Table {
|
||||
}),
|
||||
Value::test_record(record! {
|
||||
"a" => Value::test_int(3),
|
||||
"b" => Value::test_int(4),
|
||||
"b" => Value::test_list(vec![
|
||||
Value::test_int(4),
|
||||
Value::test_int(4),
|
||||
])
|
||||
}),
|
||||
])),
|
||||
},
|
||||
|
Reference in New Issue
Block a user