-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Consider:
> [[foo, bar]; [1, 2], [3, 4]] | tree
└── value
├── foo
│ └── 1
├── bar
│ └── 2
├── foo
│ └── 3
└── bar
└── 4
Here, the tree output does not make it clear that 1 2 and 3 4 are separate rows. Instead, a somewhat confusing notation is used where it looks like we have "duplicate keys".
Here are some suggestions on how I think this output could be improved:
# We could use a sort of separator line
└── value
├── foo
│ └── 1
├── bar
│ └── 2
├──----------------------------------
├── foo
│ └── 3
└── bar
└── 4
# We could make the rows separate entries in the tree
└── value
├── 0
│ ├── foo
│ │ └── 1
│ └── bar
│ └── 2
└── 1
├── foo
│ └── 3
└── bar
└── 4
I think I prefer the former approach as this minimizes unecessary extra tree depth.
Metadata
Metadata
Assignees
Labels
No labels