From 0ae0732fbdb63336c570e604e1bc6ce31ef856e5 Mon Sep 17 00:00:00 2001 From: tkokasih <3914304+tkokasih@users.noreply.github.com> Date: Sun, 22 Oct 2023 22:58:25 +0800 Subject: [PATCH] fix output example Fix output example for expanded and collapsed view --- commands/docs/table.md | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/commands/docs/table.md b/commands/docs/table.md index 75cdc598d41..e3967a806fa 100644 --- a/commands/docs/table.md +++ b/commands/docs/table.md @@ -61,26 +61,32 @@ Render data in table view Render data in table view (expanded) ```nu > [[a b]; [1 2] [2 [4 4]]] | table --expand -╭───┬───┬───╮ -│ # │ a │ b │ -├───┼───┼───┤ -│ 0 │ 1 │ 2 │ -│ 1 │ 3 │ 4 │ -╰───┴───┴───╯ +╭───┬───┬───────────╮ +│ # │ a │ b │ +├───┼───┼───────────┤ +│ 0 │ 1 │ 2 │ +│ 1 │ 2 │ ╭───┬───╮ │ +│ │ │ │ 0 │ 4 │ │ +│ │ │ │ 1 │ 4 │ │ +│ │ │ ╰───┴───╯ │ +╰───┴───┴───────────╯ ``` Render data in table view (collapsed) ```nu > [[a b]; [1 2] [2 [4 4]]] | table --collapse -╭───┬───┬───╮ -│ # │ a │ b │ -├───┼───┼───┤ -│ 0 │ 1 │ 2 │ -│ 1 │ 3 │ 4 │ -╰───┴───┴───╯ +╭───┬───╮ +│ a │ b │ +├───┼───┤ +│ 1 │ 2 │ +├───┼───┤ +│ 2 │ 4 │ +│ ├───┤ +│ │ 4 │ +╰───┴───╯ ``` ## Notes -If the table contains a column called 'index', this column is used as the table index instead of the usual continuous index. \ No newline at end of file +If the table contains a column called 'index', this column is used as the table index instead of the usual continuous index.