mirror of
https://github.com/nushell/nushell
synced 2024-12-28 05:53:09 +00:00
fix list formatting (#762)
This commit is contained in:
parent
283a615ecc
commit
c55b6c5ed5
1 changed files with 4 additions and 2 deletions
|
@ -283,8 +283,10 @@ fn convert_to_table(
|
||||||
vec![("string".to_string(), (row_num + row_offset).to_string())];
|
vec![("string".to_string(), (row_num + row_offset).to_string())];
|
||||||
|
|
||||||
if headers.is_empty() {
|
if headers.is_empty() {
|
||||||
// if header row is empty, this is probably a list so format it that way
|
row.push((
|
||||||
row.push(("list".to_string(), item.into_abbreviated_string(config)))
|
item.get_type().to_string(),
|
||||||
|
item.into_abbreviated_string(config),
|
||||||
|
))
|
||||||
} else {
|
} else {
|
||||||
for header in headers.iter().skip(1) {
|
for header in headers.iter().skip(1) {
|
||||||
let result = match item {
|
let result = match item {
|
||||||
|
|
Loading…
Reference in a new issue