diff --git a/crates/nu-command/tests/commands/table.rs b/crates/nu-command/tests/commands/table.rs index 590a5e4a3f..33fd351985 100644 --- a/crates/nu-command/tests/commands/table.rs +++ b/crates/nu-command/tests/commands/table.rs @@ -1362,16 +1362,21 @@ fn test_expand_big_0() { "│ │ │ │ d │ │", "│ │ │ │ } │ │", "│ │ ╰───────────┴───╯ │", - "│ │ ╭───┬──────┬────╮ │", - "│ bench │ │ # │ name │ ha │ │", - "│ │ │ │ │ rn │ │", - "│ │ │ │ │ es │ │", - "│ │ │ │ │ s │ │", - "│ │ ├───┼──────┼────┤ │", - "│ │ │ 0 │ benc │ fa │ │", - "│ │ │ │ hmar │ ls │ │", - "│ │ │ │ ks │ e │ │", - "│ │ ╰───┴──────┴────╯ │", + "│ │ ╭───┬───────┬───╮ │", + "│ bench │ │ # │ name │ h │ │", + "│ │ │ │ │ a │ │", + "│ │ │ │ │ r │ │", + "│ │ │ │ │ n │ │", + "│ │ │ │ │ e │ │", + "│ │ │ │ │ s │ │", + "│ │ │ │ │ s │ │", + "│ │ ├───┼───────┼───┤ │", + "│ │ │ 0 │ bench │ f │ │", + "│ │ │ │ marks │ a │ │", + "│ │ │ │ │ l │ │", + "│ │ │ │ │ s │ │", + "│ │ │ │ │ e │ │", + "│ │ ╰───┴───────┴───╯ │", "╰──────────────────┴───────────────────╯", ]); @@ -1553,114 +1558,303 @@ fn table_expande_with_no_header_internally_0() { "│ │ │ │ │ │ ╰─────┴──────────╯ │ │ │", "│ │ │ │ │ display_output │ │ │ │", "│ │ │ │ ╰────────────────┴────────────────────╯ │ │", - "│ │ │ │ ╭───┬───────────────────────────┬────────────────────────┬────────┬─────╮ │ │", - "│ │ │ menus │ │ # │ name │ only_buffer_difference │ marker │ ... │ │ │", - "│ │ │ │ ├───┼───────────────────────────┼────────────────────────┼────────┼─────┤ │ │", - "│ │ │ │ │ 0 │ completion_menu │ false │ | │ ... │ │ │", - "│ │ │ │ │ 1 │ history_menu │ true │ ? │ ... │ │ │", - "│ │ │ │ │ 2 │ help_menu │ true │ ? │ ... │ │ │", - "│ │ │ │ │ 3 │ commands_menu │ false │ # │ ... │ │ │", - "│ │ │ │ │ 4 │ vars_menu │ true │ # │ ... │ │ │", - "│ │ │ │ │ 5 │ commands_with_description │ true │ # │ ... │ │ │", - "│ │ │ │ ╰───┴───────────────────────────┴────────────────────────┴────────┴─────╯ │ │", - "│ │ │ │ ╭────┬───────────────────────────┬──────────┬─────────┬────────────────┬────╮ │ │", - "│ │ │ keybindings │ │ # │ name │ modifier │ keycode │ mode │ ev │ │ │", - "│ │ │ │ │ │ │ │ │ │ en │ │ │", - "│ │ │ │ │ │ │ │ │ │ t │ │ │", - "│ │ │ │ ├────┼───────────────────────────┼──────────┼─────────┼────────────────┼────┤ │ │", - "│ │ │ │ │ 0 │ completion_menu │ none │ tab │ ╭───┬────────╮ │ {r │ │ │", - "│ │ │ │ │ │ │ │ │ │ 0 │ emacs │ │ ec │ │ │", - "│ │ │ │ │ │ │ │ │ │ 1 │ vi_nor │ │ or │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ mal │ │ d │ │ │", - "│ │ │ │ │ │ │ │ │ │ 2 │ vi_ins │ │ 1 │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ ert │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ ╰───┴────────╯ │ el │ │ │", - "│ │ │ │ │ │ │ │ │ │ d} │ │ │", - "│ │ │ │ │ 1 │ completion_previous │ shift │ backtab │ ╭───┬────────╮ │ {r │ │ │", - "│ │ │ │ │ │ │ │ │ │ 0 │ emacs │ │ ec │ │ │", - "│ │ │ │ │ │ │ │ │ │ 1 │ vi_nor │ │ or │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ mal │ │ d │ │ │", - "│ │ │ │ │ │ │ │ │ │ 2 │ vi_ins │ │ 1 │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ ert │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ ╰───┴────────╯ │ el │ │ │", - "│ │ │ │ │ │ │ │ │ │ d} │ │ │", - "│ │ │ │ │ 2 │ history_menu │ control │ char_r │ emacs │ {r │ │ │", - "│ │ │ │ │ │ │ │ │ │ ec │ │ │", - "│ │ │ │ │ │ │ │ │ │ or │ │ │", - "│ │ │ │ │ │ │ │ │ │ d │ │ │", - "│ │ │ │ │ │ │ │ │ │ 2 │ │ │", - "│ │ │ │ │ │ │ │ │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ el │ │ │", - "│ │ │ │ │ │ │ │ │ │ ds │ │ │", - "│ │ │ │ │ │ │ │ │ │ } │ │ │", - "│ │ │ │ │ 3 │ next_page │ control │ char_x │ emacs │ {r │ │ │", - "│ │ │ │ │ │ │ │ │ │ ec │ │ │", - "│ │ │ │ │ │ │ │ │ │ or │ │ │", - "│ │ │ │ │ │ │ │ │ │ d │ │ │", - "│ │ │ │ │ │ │ │ │ │ 1 │ │ │", - "│ │ │ │ │ │ │ │ │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ el │ │ │", - "│ │ │ │ │ │ │ │ │ │ d} │ │ │", - "│ │ │ │ │ 4 │ undo_or_previous_page │ control │ char_z │ emacs │ {r │ │ │", - "│ │ │ │ │ │ │ │ │ │ ec │ │ │", - "│ │ │ │ │ │ │ │ │ │ or │ │ │", - "│ │ │ │ │ │ │ │ │ │ d │ │ │", - "│ │ │ │ │ │ │ │ │ │ 1 │ │ │", - "│ │ │ │ │ │ │ │ │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ el │ │ │", - "│ │ │ │ │ │ │ │ │ │ d} │ │ │", - "│ │ │ │ │ 5 │ yank │ control │ char_y │ emacs │ {r │ │ │", - "│ │ │ │ │ │ │ │ │ │ ec │ │ │", - "│ │ │ │ │ │ │ │ │ │ or │ │ │", - "│ │ │ │ │ │ │ │ │ │ d │ │ │", - "│ │ │ │ │ │ │ │ │ │ 1 │ │ │", - "│ │ │ │ │ │ │ │ │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ el │ │ │", - "│ │ │ │ │ │ │ │ │ │ d} │ │ │", - "│ │ │ │ │ 6 │ unix-line-discard │ control │ char_u │ ╭───┬────────╮ │ {r │ │ │", - "│ │ │ │ │ │ │ │ │ │ 0 │ emacs │ │ ec │ │ │", - "│ │ │ │ │ │ │ │ │ │ 1 │ vi_nor │ │ or │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ mal │ │ d │ │ │", - "│ │ │ │ │ │ │ │ │ │ 2 │ vi_ins │ │ 1 │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ ert │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ ╰───┴────────╯ │ el │ │ │", - "│ │ │ │ │ │ │ │ │ │ d} │ │ │", - "│ │ │ │ │ 7 │ kill-line │ control │ char_k │ ╭───┬────────╮ │ {r │ │ │", - "│ │ │ │ │ │ │ │ │ │ 0 │ emacs │ │ ec │ │ │", - "│ │ │ │ │ │ │ │ │ │ 1 │ vi_nor │ │ or │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ mal │ │ d │ │ │", - "│ │ │ │ │ │ │ │ │ │ 2 │ vi_ins │ │ 1 │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ ert │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ ╰───┴────────╯ │ el │ │ │", - "│ │ │ │ │ │ │ │ │ │ d} │ │ │", - "│ │ │ │ │ 8 │ commands_menu │ control │ char_t │ ╭───┬────────╮ │ {r │ │ │", - "│ │ │ │ │ │ │ │ │ │ 0 │ emacs │ │ ec │ │ │", - "│ │ │ │ │ │ │ │ │ │ 1 │ vi_nor │ │ or │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ mal │ │ d │ │ │", - "│ │ │ │ │ │ │ │ │ │ 2 │ vi_ins │ │ 2 │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ ert │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ ╰───┴────────╯ │ el │ │ │", - "│ │ │ │ │ │ │ │ │ │ ds │ │ │", - "│ │ │ │ │ │ │ │ │ │ } │ │ │", - "│ │ │ │ │ 9 │ vars_menu │ alt │ char_o │ ╭───┬────────╮ │ {r │ │ │", - "│ │ │ │ │ │ │ │ │ │ 0 │ emacs │ │ ec │ │ │", - "│ │ │ │ │ │ │ │ │ │ 1 │ vi_nor │ │ or │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ mal │ │ d │ │ │", - "│ │ │ │ │ │ │ │ │ │ 2 │ vi_ins │ │ 2 │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ ert │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ ╰───┴────────╯ │ el │ │ │", - "│ │ │ │ │ │ │ │ │ │ ds │ │ │", - "│ │ │ │ │ │ │ │ │ │ } │ │ │", - "│ │ │ │ │ 10 │ commands_with_description │ control │ char_s │ ╭───┬────────╮ │ {r │ │ │", - "│ │ │ │ │ │ │ │ │ │ 0 │ emacs │ │ ec │ │ │", - "│ │ │ │ │ │ │ │ │ │ 1 │ vi_nor │ │ or │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ mal │ │ d │ │ │", - "│ │ │ │ │ │ │ │ │ │ 2 │ vi_ins │ │ 2 │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ ert │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ ╰───┴────────╯ │ el │ │ │", - "│ │ │ │ │ │ │ │ │ │ ds │ │ │", - "│ │ │ │ │ │ │ │ │ │ } │ │ │", - "│ │ │ │ ╰────┴───────────────────────────┴──────────┴─────────┴────────────────┴────╯ │ │", + "│ │ │ │ ╭───┬───────────────────────────┬────────────────────────┬────────┬───┬─────╮ │ │", + "│ │ │ menus │ │ # │ name │ only_buffer_difference │ marker │ t │ ... │ │ │", + "│ │ │ │ │ │ │ │ │ y │ │ │ │", + "│ │ │ │ │ │ │ │ │ p │ │ │ │", + "│ │ │ │ │ │ │ │ │ e │ │ │ │", + "│ │ │ │ ├───┼───────────────────────────┼────────────────────────┼────────┼───┼─────┤ │ │", + "│ │ │ │ │ 0 │ completion_menu │ false │ | │ { │ ... │ │ │", + "│ │ │ │ │ │ │ │ │ r │ │ │ │", + "│ │ │ │ │ │ │ │ │ e │ │ │ │", + "│ │ │ │ │ │ │ │ │ c │ │ │ │", + "│ │ │ │ │ │ │ │ │ o │ │ │ │", + "│ │ │ │ │ │ │ │ │ r │ │ │ │", + "│ │ │ │ │ │ │ │ │ d │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ 4 │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ f │ │ │ │", + "│ │ │ │ │ │ │ │ │ i │ │ │ │", + "│ │ │ │ │ │ │ │ │ e │ │ │ │", + "│ │ │ │ │ │ │ │ │ l │ │ │ │", + "│ │ │ │ │ │ │ │ │ d │ │ │ │", + "│ │ │ │ │ │ │ │ │ s │ │ │ │", + "│ │ │ │ │ │ │ │ │ } │ │ │ │", + "│ │ │ │ │ 1 │ history_menu │ true │ ? │ { │ ... │ │ │", + "│ │ │ │ │ │ │ │ │ r │ │ │ │", + "│ │ │ │ │ │ │ │ │ e │ │ │ │", + "│ │ │ │ │ │ │ │ │ c │ │ │ │", + "│ │ │ │ │ │ │ │ │ o │ │ │ │", + "│ │ │ │ │ │ │ │ │ r │ │ │ │", + "│ │ │ │ │ │ │ │ │ d │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ 2 │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ f │ │ │ │", + "│ │ │ │ │ │ │ │ │ i │ │ │ │", + "│ │ │ │ │ │ │ │ │ e │ │ │ │", + "│ │ │ │ │ │ │ │ │ l │ │ │ │", + "│ │ │ │ │ │ │ │ │ d │ │ │ │", + "│ │ │ │ │ │ │ │ │ s │ │ │ │", + "│ │ │ │ │ │ │ │ │ } │ │ │ │", + "│ │ │ │ │ 2 │ help_menu │ true │ ? │ { │ ... │ │ │", + "│ │ │ │ │ │ │ │ │ r │ │ │ │", + "│ │ │ │ │ │ │ │ │ e │ │ │ │", + "│ │ │ │ │ │ │ │ │ c │ │ │ │", + "│ │ │ │ │ │ │ │ │ o │ │ │ │", + "│ │ │ │ │ │ │ │ │ r │ │ │ │", + "│ │ │ │ │ │ │ │ │ d │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ 6 │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ f │ │ │ │", + "│ │ │ │ │ │ │ │ │ i │ │ │ │", + "│ │ │ │ │ │ │ │ │ e │ │ │ │", + "│ │ │ │ │ │ │ │ │ l │ │ │ │", + "│ │ │ │ │ │ │ │ │ d │ │ │ │", + "│ │ │ │ │ │ │ │ │ s │ │ │ │", + "│ │ │ │ │ │ │ │ │ } │ │ │ │", + "│ │ │ │ │ 3 │ commands_menu │ false │ # │ { │ ... │ │ │", + "│ │ │ │ │ │ │ │ │ r │ │ │ │", + "│ │ │ │ │ │ │ │ │ e │ │ │ │", + "│ │ │ │ │ │ │ │ │ c │ │ │ │", + "│ │ │ │ │ │ │ │ │ o │ │ │ │", + "│ │ │ │ │ │ │ │ │ r │ │ │ │", + "│ │ │ │ │ │ │ │ │ d │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ 4 │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ f │ │ │ │", + "│ │ │ │ │ │ │ │ │ i │ │ │ │", + "│ │ │ │ │ │ │ │ │ e │ │ │ │", + "│ │ │ │ │ │ │ │ │ l │ │ │ │", + "│ │ │ │ │ │ │ │ │ d │ │ │ │", + "│ │ │ │ │ │ │ │ │ s │ │ │ │", + "│ │ │ │ │ │ │ │ │ } │ │ │ │", + "│ │ │ │ │ 4 │ vars_menu │ true │ # │ { │ ... │ │ │", + "│ │ │ │ │ │ │ │ │ r │ │ │ │", + "│ │ │ │ │ │ │ │ │ e │ │ │ │", + "│ │ │ │ │ │ │ │ │ c │ │ │ │", + "│ │ │ │ │ │ │ │ │ o │ │ │ │", + "│ │ │ │ │ │ │ │ │ r │ │ │ │", + "│ │ │ │ │ │ │ │ │ d │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ 2 │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ f │ │ │ │", + "│ │ │ │ │ │ │ │ │ i │ │ │ │", + "│ │ │ │ │ │ │ │ │ e │ │ │ │", + "│ │ │ │ │ │ │ │ │ l │ │ │ │", + "│ │ │ │ │ │ │ │ │ d │ │ │ │", + "│ │ │ │ │ │ │ │ │ s │ │ │ │", + "│ │ │ │ │ │ │ │ │ } │ │ │ │", + "│ │ │ │ │ 5 │ commands_with_description │ true │ # │ { │ ... │ │ │", + "│ │ │ │ │ │ │ │ │ r │ │ │ │", + "│ │ │ │ │ │ │ │ │ e │ │ │ │", + "│ │ │ │ │ │ │ │ │ c │ │ │ │", + "│ │ │ │ │ │ │ │ │ o │ │ │ │", + "│ │ │ │ │ │ │ │ │ r │ │ │ │", + "│ │ │ │ │ │ │ │ │ d │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ 6 │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ f │ │ │ │", + "│ │ │ │ │ │ │ │ │ i │ │ │ │", + "│ │ │ │ │ │ │ │ │ e │ │ │ │", + "│ │ │ │ │ │ │ │ │ l │ │ │ │", + "│ │ │ │ │ │ │ │ │ d │ │ │ │", + "│ │ │ │ │ │ │ │ │ s │ │ │ │", + "│ │ │ │ │ │ │ │ │ } │ │ │ │", + "│ │ │ │ ╰───┴───────────────────────────┴────────────────────────┴────────┴───┴─────╯ │ │", + "│ │ │ │ ╭────┬───────────────────────────┬──────────┬─────────┬─────────────────┬───╮ │ │", + "│ │ │ keybindings │ │ # │ name │ modifier │ keycode │ mode │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ v │ │ │", + "│ │ │ │ │ │ │ │ │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ n │ │ │", + "│ │ │ │ │ │ │ │ │ │ t │ │ │", + "│ │ │ │ ├────┼───────────────────────────┼──────────┼─────────┼─────────────────┼───┤ │ │", + "│ │ │ │ │ 0 │ completion_menu │ none │ tab │ ╭───┬─────────╮ │ { │ │ │", + "│ │ │ │ │ │ │ │ │ │ 0 │ emacs │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ vi_norm │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ al │ │ c │ │ │", + "│ │ │ │ │ │ │ │ │ │ 2 │ vi_inse │ │ o │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ rt │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ ╰───┴─────────╯ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ f │ │ │", + "│ │ │ │ │ │ │ │ │ │ i │ │ │", + "│ │ │ │ │ │ │ │ │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ l │ │ │", + "│ │ │ │ │ │ │ │ │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ } │ │ │", + "│ │ │ │ │ 1 │ completion_previous │ shift │ backtab │ ╭───┬─────────╮ │ { │ │ │", + "│ │ │ │ │ │ │ │ │ │ 0 │ emacs │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ vi_norm │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ al │ │ c │ │ │", + "│ │ │ │ │ │ │ │ │ │ 2 │ vi_inse │ │ o │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ rt │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ ╰───┴─────────╯ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ f │ │ │", + "│ │ │ │ │ │ │ │ │ │ i │ │ │", + "│ │ │ │ │ │ │ │ │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ l │ │ │", + "│ │ │ │ │ │ │ │ │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ } │ │ │", + "│ │ │ │ │ 2 │ history_menu │ control │ char_r │ emacs │ { │ │ │", + "│ │ │ │ │ │ │ │ │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ c │ │ │", + "│ │ │ │ │ │ │ │ │ │ o │ │ │", + "│ │ │ │ │ │ │ │ │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ 2 │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ f │ │ │", + "│ │ │ │ │ │ │ │ │ │ i │ │ │", + "│ │ │ │ │ │ │ │ │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ l │ │ │", + "│ │ │ │ │ │ │ │ │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ s │ │ │", + "│ │ │ │ │ │ │ │ │ │ } │ │ │", + "│ │ │ │ │ 3 │ next_page │ control │ char_x │ emacs │ { │ │ │", + "│ │ │ │ │ │ │ │ │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ c │ │ │", + "│ │ │ │ │ │ │ │ │ │ o │ │ │", + "│ │ │ │ │ │ │ │ │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ f │ │ │", + "│ │ │ │ │ │ │ │ │ │ i │ │ │", + "│ │ │ │ │ │ │ │ │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ l │ │ │", + "│ │ │ │ │ │ │ │ │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ } │ │ │", + "│ │ │ │ │ 4 │ undo_or_previous_page │ control │ char_z │ emacs │ { │ │ │", + "│ │ │ │ │ │ │ │ │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ c │ │ │", + "│ │ │ │ │ │ │ │ │ │ o │ │ │", + "│ │ │ │ │ │ │ │ │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ f │ │ │", + "│ │ │ │ │ │ │ │ │ │ i │ │ │", + "│ │ │ │ │ │ │ │ │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ l │ │ │", + "│ │ │ │ │ │ │ │ │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ } │ │ │", + "│ │ │ │ │ 5 │ yank │ control │ char_y │ emacs │ { │ │ │", + "│ │ │ │ │ │ │ │ │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ c │ │ │", + "│ │ │ │ │ │ │ │ │ │ o │ │ │", + "│ │ │ │ │ │ │ │ │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ f │ │ │", + "│ │ │ │ │ │ │ │ │ │ i │ │ │", + "│ │ │ │ │ │ │ │ │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ l │ │ │", + "│ │ │ │ │ │ │ │ │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ } │ │ │", + "│ │ │ │ │ 6 │ unix-line-discard │ control │ char_u │ ╭───┬─────────╮ │ { │ │ │", + "│ │ │ │ │ │ │ │ │ │ 0 │ emacs │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ vi_norm │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ al │ │ c │ │ │", + "│ │ │ │ │ │ │ │ │ │ 2 │ vi_inse │ │ o │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ rt │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ ╰───┴─────────╯ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ f │ │ │", + "│ │ │ │ │ │ │ │ │ │ i │ │ │", + "│ │ │ │ │ │ │ │ │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ l │ │ │", + "│ │ │ │ │ │ │ │ │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ } │ │ │", + "│ │ │ │ │ 7 │ kill-line │ control │ char_k │ ╭───┬─────────╮ │ { │ │ │", + "│ │ │ │ │ │ │ │ │ │ 0 │ emacs │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ vi_norm │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ al │ │ c │ │ │", + "│ │ │ │ │ │ │ │ │ │ 2 │ vi_inse │ │ o │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ rt │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ ╰───┴─────────╯ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ f │ │ │", + "│ │ │ │ │ │ │ │ │ │ i │ │ │", + "│ │ │ │ │ │ │ │ │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ l │ │ │", + "│ │ │ │ │ │ │ │ │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ } │ │ │", + "│ │ │ │ │ 8 │ commands_menu │ control │ char_t │ ╭───┬─────────╮ │ { │ │ │", + "│ │ │ │ │ │ │ │ │ │ 0 │ emacs │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ vi_norm │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ al │ │ c │ │ │", + "│ │ │ │ │ │ │ │ │ │ 2 │ vi_inse │ │ o │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ rt │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ ╰───┴─────────╯ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ 2 │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ f │ │ │", + "│ │ │ │ │ │ │ │ │ │ i │ │ │", + "│ │ │ │ │ │ │ │ │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ l │ │ │", + "│ │ │ │ │ │ │ │ │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ s │ │ │", + "│ │ │ │ │ │ │ │ │ │ } │ │ │", + "│ │ │ │ │ 9 │ vars_menu │ alt │ char_o │ ╭───┬─────────╮ │ { │ │ │", + "│ │ │ │ │ │ │ │ │ │ 0 │ emacs │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ vi_norm │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ al │ │ c │ │ │", + "│ │ │ │ │ │ │ │ │ │ 2 │ vi_inse │ │ o │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ rt │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ ╰───┴─────────╯ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ 2 │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ f │ │ │", + "│ │ │ │ │ │ │ │ │ │ i │ │ │", + "│ │ │ │ │ │ │ │ │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ l │ │ │", + "│ │ │ │ │ │ │ │ │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ s │ │ │", + "│ │ │ │ │ │ │ │ │ │ } │ │ │", + "│ │ │ │ │ 10 │ commands_with_description │ control │ char_s │ ╭───┬─────────╮ │ { │ │ │", + "│ │ │ │ │ │ │ │ │ │ 0 │ emacs │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ vi_norm │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ al │ │ c │ │ │", + "│ │ │ │ │ │ │ │ │ │ 2 │ vi_inse │ │ o │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ rt │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ ╰───┴─────────╯ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ 2 │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ f │ │ │", + "│ │ │ │ │ │ │ │ │ │ i │ │ │", + "│ │ │ │ │ │ │ │ │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ l │ │ │", + "│ │ │ │ │ │ │ │ │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ s │ │ │", + "│ │ │ │ │ │ │ │ │ │ } │ │ │", + "│ │ │ │ ╰────┴───────────────────────────┴──────────┴─────────┴─────────────────┴───╯ │ │", "│ │ ╰──────────────────────────────────┴───────────────────────────────────────────────────────────────────────────────╯ │", "╰────────────────────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯", ]) @@ -1852,226 +2046,419 @@ fn table_expande_with_no_header_internally_1() { "│ │ │ │ │ 4 │ vars_menu │ true │ # │ ... │ │ │", "│ │ │ │ │ 5 │ commands_with_description │ true │ # │ ... │ │ │", "│ │ │ │ ╰───┴───────────────────────────┴────────────────────────┴───────┴─────╯ │ │", - "│ │ │ │ ╭────┬───────────────────────────┬──────────┬─────────┬───────────┬────╮ │ │", - "│ │ │ keybindings │ │ # │ name │ modifier │ keycode │ mode │ ev │ │ │", - "│ │ │ │ │ │ │ │ │ │ en │ │ │", - "│ │ │ │ │ │ │ │ │ │ t │ │ │", - "│ │ │ │ ├────┼───────────────────────────┼──────────┼─────────┼───────────┼────┤ │ │", - "│ │ │ │ │ 0 │ completion_menu │ none │ tab │ ╭───┬───╮ │ {r │ │ │", - "│ │ │ │ │ │ │ │ │ │ 0 │ e │ │ ec │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ m │ │ or │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ a │ │ d │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ c │ │ 1 │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ s │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ 1 │ v │ │ el │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ i │ │ d} │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ _ │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ n │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ o │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ r │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ m │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ a │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ l │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ 2 │ v │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ i │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ _ │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ i │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ n │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ s │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ e │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ r │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ t │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ ╰───┴───╯ │ │ │ │", - "│ │ │ │ │ 1 │ completion_previous │ shift │ backtab │ ╭───┬───╮ │ {r │ │ │", - "│ │ │ │ │ │ │ │ │ │ 0 │ e │ │ ec │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ m │ │ or │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ a │ │ d │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ c │ │ 1 │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ s │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ 1 │ v │ │ el │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ i │ │ d} │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ _ │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ n │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ o │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ r │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ m │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ a │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ l │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ 2 │ v │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ i │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ _ │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ i │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ n │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ s │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ e │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ r │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ t │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ ╰───┴───╯ │ │ │ │", - "│ │ │ │ │ 2 │ history_menu │ control │ char_r │ emacs │ {r │ │ │", - "│ │ │ │ │ │ │ │ │ │ ec │ │ │", - "│ │ │ │ │ │ │ │ │ │ or │ │ │", - "│ │ │ │ │ │ │ │ │ │ d │ │ │", - "│ │ │ │ │ │ │ │ │ │ 2 │ │ │", - "│ │ │ │ │ │ │ │ │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ el │ │ │", - "│ │ │ │ │ │ │ │ │ │ ds │ │ │", - "│ │ │ │ │ │ │ │ │ │ } │ │ │", - "│ │ │ │ │ 3 │ next_page │ control │ char_x │ emacs │ {r │ │ │", - "│ │ │ │ │ │ │ │ │ │ ec │ │ │", - "│ │ │ │ │ │ │ │ │ │ or │ │ │", - "│ │ │ │ │ │ │ │ │ │ d │ │ │", - "│ │ │ │ │ │ │ │ │ │ 1 │ │ │", - "│ │ │ │ │ │ │ │ │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ el │ │ │", - "│ │ │ │ │ │ │ │ │ │ d} │ │ │", - "│ │ │ │ │ 4 │ undo_or_previous_page │ control │ char_z │ emacs │ {r │ │ │", - "│ │ │ │ │ │ │ │ │ │ ec │ │ │", - "│ │ │ │ │ │ │ │ │ │ or │ │ │", - "│ │ │ │ │ │ │ │ │ │ d │ │ │", - "│ │ │ │ │ │ │ │ │ │ 1 │ │ │", - "│ │ │ │ │ │ │ │ │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ el │ │ │", - "│ │ │ │ │ │ │ │ │ │ d} │ │ │", - "│ │ │ │ │ 5 │ yank │ control │ char_y │ emacs │ {r │ │ │", - "│ │ │ │ │ │ │ │ │ │ ec │ │ │", - "│ │ │ │ │ │ │ │ │ │ or │ │ │", - "│ │ │ │ │ │ │ │ │ │ d │ │ │", - "│ │ │ │ │ │ │ │ │ │ 1 │ │ │", - "│ │ │ │ │ │ │ │ │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ el │ │ │", - "│ │ │ │ │ │ │ │ │ │ d} │ │ │", - "│ │ │ │ │ 6 │ unix-line-discard │ control │ char_u │ ╭───┬───╮ │ {r │ │ │", - "│ │ │ │ │ │ │ │ │ │ 0 │ e │ │ ec │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ m │ │ or │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ a │ │ d │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ c │ │ 1 │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ s │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ 1 │ v │ │ el │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ i │ │ d} │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ _ │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ n │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ o │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ r │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ m │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ a │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ l │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ 2 │ v │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ i │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ _ │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ i │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ n │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ s │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ e │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ r │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ t │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ ╰───┴───╯ │ │ │ │", - "│ │ │ │ │ 7 │ kill-line │ control │ char_k │ ╭───┬───╮ │ {r │ │ │", - "│ │ │ │ │ │ │ │ │ │ 0 │ e │ │ ec │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ m │ │ or │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ a │ │ d │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ c │ │ 1 │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ s │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ 1 │ v │ │ el │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ i │ │ d} │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ _ │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ n │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ o │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ r │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ m │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ a │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ l │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ 2 │ v │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ i │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ _ │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ i │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ n │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ s │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ e │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ r │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ t │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ ╰───┴───╯ │ │ │ │", - "│ │ │ │ │ 8 │ commands_menu │ control │ char_t │ ╭───┬───╮ │ {r │ │ │", - "│ │ │ │ │ │ │ │ │ │ 0 │ e │ │ ec │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ m │ │ or │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ a │ │ d │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ c │ │ 2 │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ s │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ 1 │ v │ │ el │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ i │ │ ds │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ _ │ │ } │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ n │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ o │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ r │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ m │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ a │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ l │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ 2 │ v │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ i │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ _ │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ i │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ n │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ s │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ e │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ r │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ t │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ ╰───┴───╯ │ │ │ │", - "│ │ │ │ │ 9 │ vars_menu │ alt │ char_o │ ╭───┬───╮ │ {r │ │ │", - "│ │ │ │ │ │ │ │ │ │ 0 │ e │ │ ec │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ m │ │ or │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ a │ │ d │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ c │ │ 2 │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ s │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ 1 │ v │ │ el │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ i │ │ ds │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ _ │ │ } │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ n │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ o │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ r │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ m │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ a │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ l │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ 2 │ v │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ i │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ _ │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ i │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ n │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ s │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ e │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ r │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ t │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ ╰───┴───╯ │ │ │ │", - "│ │ │ │ │ 10 │ commands_with_description │ control │ char_s │ ╭───┬───╮ │ {r │ │ │", - "│ │ │ │ │ │ │ │ │ │ 0 │ e │ │ ec │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ m │ │ or │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ a │ │ d │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ c │ │ 2 │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ s │ │ fi │ │ │", - "│ │ │ │ │ │ │ │ │ │ 1 │ v │ │ el │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ i │ │ ds │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ _ │ │ } │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ n │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ o │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ r │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ m │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ a │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ l │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ 2 │ v │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ i │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ _ │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ i │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ n │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ s │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ e │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ r │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ │ │ t │ │ │ │ │", - "│ │ │ │ │ │ │ │ │ ╰───┴───╯ │ │ │ │", - "│ │ │ │ ╰────┴───────────────────────────┴──────────┴─────────┴───────────┴────╯ │ │", + "│ │ │ │ ╭────┬───────────────────────────┬──────────┬─────────┬────────────┬───╮ │ │", + "│ │ │ keybindings │ │ # │ name │ modifier │ keycode │ mode │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ v │ │ │", + "│ │ │ │ │ │ │ │ │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ n │ │ │", + "│ │ │ │ │ │ │ │ │ │ t │ │ │", + "│ │ │ │ ├────┼───────────────────────────┼──────────┼─────────┼────────────┼───┤ │ │", + "│ │ │ │ │ 0 │ completion_menu │ none │ tab │ ╭───┬────╮ │ { │ │ │", + "│ │ │ │ │ │ │ │ │ │ 0 │ em │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ ac │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ s │ │ c │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ vi │ │ o │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ _n │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ or │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ ma │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ l │ │ 1 │ │ │", + "│ │ │ │ │ │ │ │ │ │ 2 │ vi │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ _i │ │ f │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ ns │ │ i │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ er │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ t │ │ l │ │ │", + "│ │ │ │ │ │ │ │ │ ╰───┴────╯ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ } │ │ │", + "│ │ │ │ │ 1 │ completion_previous │ shift │ backtab │ ╭───┬────╮ │ { │ │ │", + "│ │ │ │ │ │ │ │ │ │ 0 │ em │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ ac │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ s │ │ c │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ vi │ │ o │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ _n │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ or │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ ma │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ l │ │ 1 │ │ │", + "│ │ │ │ │ │ │ │ │ │ 2 │ vi │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ _i │ │ f │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ ns │ │ i │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ er │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ t │ │ l │ │ │", + "│ │ │ │ │ │ │ │ │ ╰───┴────╯ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ } │ │ │", + "│ │ │ │ │ 2 │ history_menu │ control │ char_r │ emacs │ { │ │ │", + "│ │ │ │ │ │ │ │ │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ c │ │ │", + "│ │ │ │ │ │ │ │ │ │ o │ │ │", + "│ │ │ │ │ │ │ │ │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ 2 │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ f │ │ │", + "│ │ │ │ │ │ │ │ │ │ i │ │ │", + "│ │ │ │ │ │ │ │ │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ l │ │ │", + "│ │ │ │ │ │ │ │ │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ s │ │ │", + "│ │ │ │ │ │ │ │ │ │ } │ │ │", + "│ │ │ │ │ 3 │ next_page │ control │ char_x │ emacs │ { │ │ │", + "│ │ │ │ │ │ │ │ │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ c │ │ │", + "│ │ │ │ │ │ │ │ │ │ o │ │ │", + "│ │ │ │ │ │ │ │ │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ f │ │ │", + "│ │ │ │ │ │ │ │ │ │ i │ │ │", + "│ │ │ │ │ │ │ │ │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ l │ │ │", + "│ │ │ │ │ │ │ │ │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ } │ │ │", + "│ │ │ │ │ 4 │ undo_or_previous_page │ control │ char_z │ emacs │ { │ │ │", + "│ │ │ │ │ │ │ │ │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ c │ │ │", + "│ │ │ │ │ │ │ │ │ │ o │ │ │", + "│ │ │ │ │ │ │ │ │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ f │ │ │", + "│ │ │ │ │ │ │ │ │ │ i │ │ │", + "│ │ │ │ │ │ │ │ │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ l │ │ │", + "│ │ │ │ │ │ │ │ │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ } │ │ │", + "│ │ │ │ │ 5 │ yank │ control │ char_y │ emacs │ { │ │ │", + "│ │ │ │ │ │ │ │ │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ c │ │ │", + "│ │ │ │ │ │ │ │ │ │ o │ │ │", + "│ │ │ │ │ │ │ │ │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ f │ │ │", + "│ │ │ │ │ │ │ │ │ │ i │ │ │", + "│ │ │ │ │ │ │ │ │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ l │ │ │", + "│ │ │ │ │ │ │ │ │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ } │ │ │", + "│ │ │ │ │ 6 │ unix-line-discard │ control │ char_u │ ╭───┬────╮ │ { │ │ │", + "│ │ │ │ │ │ │ │ │ │ 0 │ em │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ ac │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ s │ │ c │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ vi │ │ o │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ _n │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ or │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ ma │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ l │ │ 1 │ │ │", + "│ │ │ │ │ │ │ │ │ │ 2 │ vi │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ _i │ │ f │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ ns │ │ i │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ er │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ t │ │ l │ │ │", + "│ │ │ │ │ │ │ │ │ ╰───┴────╯ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ } │ │ │", + "│ │ │ │ │ 7 │ kill-line │ control │ char_k │ ╭───┬────╮ │ { │ │ │", + "│ │ │ │ │ │ │ │ │ │ 0 │ em │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ ac │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ s │ │ c │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ vi │ │ o │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ _n │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ or │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ ma │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ l │ │ 1 │ │ │", + "│ │ │ │ │ │ │ │ │ │ 2 │ vi │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ _i │ │ f │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ ns │ │ i │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ er │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ t │ │ l │ │ │", + "│ │ │ │ │ │ │ │ │ ╰───┴────╯ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ } │ │ │", + "│ │ │ │ │ 8 │ commands_menu │ control │ char_t │ ╭───┬────╮ │ { │ │ │", + "│ │ │ │ │ │ │ │ │ │ 0 │ em │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ ac │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ s │ │ c │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ vi │ │ o │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ _n │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ or │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ ma │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ l │ │ 2 │ │ │", + "│ │ │ │ │ │ │ │ │ │ 2 │ vi │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ _i │ │ f │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ ns │ │ i │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ er │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ t │ │ l │ │ │", + "│ │ │ │ │ │ │ │ │ ╰───┴────╯ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ s │ │ │", + "│ │ │ │ │ │ │ │ │ │ } │ │ │", + "│ │ │ │ │ 9 │ vars_menu │ alt │ char_o │ ╭───┬────╮ │ { │ │ │", + "│ │ │ │ │ │ │ │ │ │ 0 │ em │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ ac │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ s │ │ c │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ vi │ │ o │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ _n │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ or │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ ma │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ l │ │ 2 │ │ │", + "│ │ │ │ │ │ │ │ │ │ 2 │ vi │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ _i │ │ f │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ ns │ │ i │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ er │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ t │ │ l │ │ │", + "│ │ │ │ │ │ │ │ │ ╰───┴────╯ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ s │ │ │", + "│ │ │ │ │ │ │ │ │ │ } │ │ │", + "│ │ │ │ │ 10 │ commands_with_description │ control │ char_s │ ╭───┬────╮ │ { │ │ │", + "│ │ │ │ │ │ │ │ │ │ 0 │ em │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ ac │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ s │ │ c │ │ │", + "│ │ │ │ │ │ │ │ │ │ 1 │ vi │ │ o │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ _n │ │ r │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ or │ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ ma │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ l │ │ 2 │ │ │", + "│ │ │ │ │ │ │ │ │ │ 2 │ vi │ │ │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ _i │ │ f │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ ns │ │ i │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ er │ │ e │ │ │", + "│ │ │ │ │ │ │ │ │ │ │ t │ │ l │ │ │", + "│ │ │ │ │ │ │ │ │ ╰───┴────╯ │ d │ │ │", + "│ │ │ │ │ │ │ │ │ │ s │ │ │", + "│ │ │ │ │ │ │ │ │ │ } │ │ │", + "│ │ │ │ ╰────┴───────────────────────────┴──────────┴─────────┴────────────┴───╯ │ │", "│ │ ╰──────────────────────────────────┴──────────────────────────────────────────────────────────────────────────╯ │", "╰────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯", ]) ); } +#[test] +fn big_table_expanded_with_padding_0() { + let nu_value = r##"{ "config ": { "ls": { "use_ls_colors": true, "clickable_links": false }, "rm": { "always_trash": false }, "cd": { "abbreviations": false }, "table": { "mode": "rounded", "index_mode": "always", "trim": { "methodology": "wrapping", "wrapping_try_keep_words": true, "truncating_suffix": "..." } }, "explore": { "help_banner": true, "exit_esc": true, "command_bar_text": "#C4C9C6", "status_bar_background": { "fg": "#1D1F21", "bg": "#C4C9C6" }, "highlight": { "bg": "yellow", "fg": "black" }, "status": {}, "try": {}, "table": { "split_line": "#404040", "cursor": true, "line_index": true, "line_shift": true, "line_head_top": true, "line_head_bottom": true, "show_head": true, "show_index": true }, "config": { "cursor_color": { "bg": "yellow", "fg": "black" } } }, "history": { "max_size": 10000, "sync_on_enter": true, "file_format": "plaintext" }, "completions": { "case_sensitive": false, "quick": true, "partial": true, "algorithm": "prefix", "external": { "enable": true, "max_results": 100, "completer": null } }, "filesize": { "metric": true, "format": "auto" }, "cursor_shape": { "emacs": "line", "vi_insert": "block", "vi_normal": "underscore" }, "color_config": { "separator": "white", "leading_trailing_space_bg": { "attr": "n" }, "header": "green_bold", "empty": "blue", "bool": null, "int": "white", "filesize": null, "duration": "white", "datetime": null, "range": "white", "float": "white", "string": "white", "nothing": "white", "binary": "white", "cell-path": "white", "row_index": "green_bold", "record": "white", "list": "white", "block": "white", "hints": "dark_gray", "search_result": {"fg": "white", "bg": "red"}, "shape_and": "purple_bold", "shape_binary": "purple_bold", "shape_block": "blue_bold", "shape_bool": "light_cyan", "shape_custom": "green", "shape_datetime": "cyan_bold", "shape_directory": "cyan", "shape_external": "cyan", "shape_externalarg": "green_bold", "shape_filepath": "cyan", "shape_flag": "blue_bold", "shape_float": "purple_bold", "shape_garbage": { "fg": "#FFFFFF", "bg": "#FF0000", "attr": "b" }, "shape_globpattern": "cyan_bold", "shape_int": "purple_bold", "shape_internalcall": "cyan_bold", "shape_list": "cyan_bold", "shape_literal": "blue", "shape_matching_brackets": { "attr": "u" }, "shape_nothing": "light_cyan", "shape_operator": "yellow", "shape_or": "purple_bold", "shape_pipe": "purple_bold", "shape_range": "yellow_bold", "shape_record": "cyan_bold", "shape_redirection": "purple_bold", "shape_signature": "green_bold", "shape_string": "green", "shape_string_interpolation": "cyan_bold", "shape_table": "blue_bold", "shape_variable": "purple" }, "footer_mode": "25", "float_precision": 2, "use_ansi_coloring": true, "edit_mode": "emacs", "shell_integration": true, "show_banner": true, "render_right_prompt_on_last_line": false, "hooks": { "pre_prompt": [ null ], "pre_execution": [ null ], "env_change": { "PWD": [ null ] }, "display_output": null }, "menus": [ { "name": "completion_menu", "only_buffer_difference": false, "marker": "| ", "type": { "layout": "columnar", "columns": 4, "col_width": 20, "col_padding": 2 }, "style": { "text": "green", "selected_text": "green_reverse", "description_text": "yellow" } }, { "name": "history_menu", "only_buffer_difference": true, "marker": "? ", "type": { "layout": "list", "page_size": 10 }, "style": { "text": "green", "selected_text": "green_reverse", "description_text": "yellow" } }, { "name": "help_menu", "only_buffer_difference": true, "marker": "? ", "type": { "layout": "description", "columns": 4, "col_width": 20, "col_padding": 2, "selection_rows": 4, "description_rows": 10 }, "style": { "text": "green", "selected_text": "green_reverse", "description_text": "yellow" } }, { "name": "commands_menu", "only_buffer_difference": false, "marker": "# ", "type": { "layout": "columnar", "columns": 4, "col_width": 20, "col_padding": 2 }, "style": { "text": "green", "selected_text": "green_reverse", "description_text": "yellow" }, "source": null }, { "name": "vars_menu", "only_buffer_difference": true, "marker": "# ", "type": { "layout": "list", "page_size": 10 }, "style": { "text": "green", "selected_text": "green_reverse", "description_text": "yellow" }, "source": null }, { "name": "commands_with_description", "only_buffer_difference": true, "marker": "# ", "type": { "layout": "description", "columns": 4, "col_width": 20, "col_padding": 2, "selection_rows": 4, "description_rows": 10 }, "style": { "text": "green", "selected_text": "green_reverse", "description_text": "yellow" }, "source": null } ], "keybindings": [ { "name": "completion_menu", "modifier": "none", "keycode": "tab", "mode": [ "emacs", "vi_normal", "vi_insert" ], "event": { "until": [ { "send": "menu", "name": "completion_menu" }, { "send": "menunext" } ] } }, { "name": "completion_previous", "modifier": "shift", "keycode": "backtab", "mode": [ "emacs", "vi_normal", "vi_insert" ], "event": { "send": "menuprevious" } }, { "name": "history_menu", "modifier": "control", "keycode": "char_r", "mode": "emacs", "event": { "send": "menu", "name": "history_menu" } }, { "name": "next_page", "modifier": "control", "keycode": "char_x", "mode": "emacs", "event": { "send": "menupagenext" } }, { "name": "undo_or_previous_page", "modifier": "control", "keycode": "char_z", "mode": "emacs", "event": { "until": [ { "send": "menupageprevious" }, { "edit": "undo" } ] } }, { "name": "yank", "modifier": "control", "keycode": "char_y", "mode": "emacs", "event": { "until": [ { "edit": "pastecutbufferafter" } ] } }, { "name": "unix-line-discard", "modifier": "control", "keycode": "char_u", "mode": [ "emacs", "vi_normal", "vi_insert" ], "event": { "until": [ { "edit": "cutfromlinestart" } ] } }, { "name": "kill-line", "modifier": "control", "keycode": "char_k", "mode": [ "emacs", "vi_normal", "vi_insert" ], "event": { "until": [ { "edit": "cuttolineend" } ] } }, { "name": "commands_menu", "modifier": "control", "keycode": "char_t", "mode": [ "emacs", "vi_normal", "vi_insert" ], "event": { "send": "menu", "name": "commands_menu" } }, { "name": "vars_menu", "modifier": "alt", "keycode": "char_o", "mode": [ "emacs", "vi_normal", "vi_insert" ], "event": { "send": "menu", "name": "vars_menu" } }, { "name": "commands_with_description", "modifier": "control", "keycode": "char_s", "mode": [ "emacs", "vi_normal", "vi_insert" ], "event": { "send": "menu", "name": "commands_with_description" } } ] } }"##; + + let actual = nu!(format!( + "$env.config.table.padding = {{ left: 2, right: 3 }}; {} | table --expand --width 141", + nu_value.trim() + )); + + _print_lines(&actual.out, 141); + + assert_eq!( + actual.out, + join_lines([ + "╭───────────────────────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮", + "│ │ ╭─────────────────────────────────────┬──────────────────────────────────────────────────────────────────────╮ │", + "│ config │ │ │ ╭────────────────────┬──────────╮ │ │", + "│ │ │ ls │ │ use_ls_colors │ true │ │ │", + "│ │ │ │ │ clickable_links │ false │ │ │", + "│ │ │ │ ╰────────────────────┴──────────╯ │ │", + "│ │ │ │ ╭─────────────────┬──────────╮ │ │", + "│ │ │ rm │ │ always_trash │ false │ │ │", + "│ │ │ │ ╰─────────────────┴──────────╯ │ │", + "│ │ │ │ ╭──────────────────┬──────────╮ │ │", + "│ │ │ cd │ │ abbreviations │ false │ │ │", + "│ │ │ │ ╰──────────────────┴──────────╯ │ │", + "│ │ │ │ ╭───────────────┬───────────────────────────────────────────────╮ │ │", + "│ │ │ table │ │ mode │ rounded │ │ │", + "│ │ │ │ │ index_mode │ always │ │ │", + "│ │ │ │ │ │ ╭────────────────────────────┬───────────╮ │ │ │", + "│ │ │ │ │ trim │ │ methodology │ wrappi │ │ │ │", + "│ │ │ │ │ │ │ │ ng │ │ │ │", + "│ │ │ │ │ │ │ wrapping_try_keep_words │ true │ │ │ │", + "│ │ │ │ │ │ │ truncating_suffix │ ... │ │ │ │", + "│ │ │ │ │ │ ╰────────────────────────────┴───────────╯ │ │ │", + "│ │ │ │ ╰───────────────┴───────────────────────────────────────────────╯ │ │", + "│ │ │ │ ╭──────────────────────────┬────────────────────────────────────╮ │ │", + "│ │ │ explore │ │ help_banner │ true │ │ │", + "│ │ │ │ │ exit_esc │ true │ │ │", + "│ │ │ │ │ command_bar_text │ #C4C9C6 │ │ │", + "│ │ │ │ │ │ ╭───────┬────────────╮ │ │ │", + "│ │ │ │ │ status_bar_background │ │ fg │ #1D1F21 │ │ │ │", + "│ │ │ │ │ │ │ bg │ #C4C9C6 │ │ │ │", + "│ │ │ │ │ │ ╰───────┴────────────╯ │ │ │", + "│ │ │ │ │ │ ╭───────┬───────────╮ │ │ │", + "│ │ │ │ │ highlight │ │ bg │ yellow │ │ │ │", + "│ │ │ │ │ │ │ fg │ black │ │ │ │", + "│ │ │ │ │ │ ╰───────┴───────────╯ │ │ │", + "│ │ │ │ │ status │ {record 0 fields} │ │ │", + "│ │ │ │ │ try │ {record 0 fields} │ │ │", + "│ │ │ │ │ │ ╭─────────────────────┬───────╮ │ │ │", + "│ │ │ │ │ table │ │ split_line │ #4 │ │ │ │", + "│ │ │ │ │ │ │ │ 04 │ │ │ │", + "│ │ │ │ │ │ │ │ 04 │ │ │ │", + "│ │ │ │ │ │ │ │ 0 │ │ │ │", + "│ │ │ │ │ │ │ cursor │ tr │ │ │ │", + "│ │ │ │ │ │ │ │ ue │ │ │ │", + "│ │ │ │ │ │ │ line_index │ tr │ │ │ │", + "│ │ │ │ │ │ │ │ ue │ │ │ │", + "│ │ │ │ │ │ │ line_shift │ tr │ │ │ │", + "│ │ │ │ │ │ │ │ ue │ │ │ │", + "│ │ │ │ │ │ │ line_head_top │ tr │ │ │ │", + "│ │ │ │ │ │ │ │ ue │ │ │ │", + "│ │ │ │ │ │ │ line_head_bottom │ tr │ │ │ │", + "│ │ │ │ │ │ │ │ ue │ │ │ │", + "│ │ │ │ │ │ │ show_head │ tr │ │ │ │", + "│ │ │ │ │ │ │ │ ue │ │ │ │", + "│ │ │ │ │ │ │ show_index │ tr │ │ │ │", + "│ │ │ │ │ │ │ │ ue │ │ │ │", + "│ │ │ │ │ │ ╰─────────────────────┴───────╯ │ │ │", + "│ │ │ │ │ │ ╭─────────────────┬───────────╮ │ │ │", + "│ │ │ │ │ config │ │ cursor_color │ {recor │ │ │ │", + "│ │ │ │ │ │ │ │ d 2 fi │ │ │ │", + "│ │ │ │ │ │ │ │ elds} │ │ │ │", + "│ │ │ │ │ │ ╰─────────────────┴───────────╯ │ │ │", + "│ │ │ │ ╰──────────────────────────┴────────────────────────────────────╯ │ │", + "│ │ │ │ ╭──────────────────┬──────────────╮ │ │", + "│ │ │ history │ │ max_size │ 10000 │ │ │", + "│ │ │ │ │ sync_on_enter │ true │ │ │", + "│ │ │ │ │ file_format │ plaintext │ │ │", + "│ │ │ │ ╰──────────────────┴──────────────╯ │ │", + "│ │ │ │ ╭────────────────────────┬──────────────────────────────────────╮ │ │", + "│ │ │ completions │ │ case_sensitive │ false │ │ │", + "│ │ │ │ │ quick │ true │ │ │", + "│ │ │ │ │ partial │ true │ │ │", + "│ │ │ │ │ algorithm │ prefix │ │ │", + "│ │ │ │ │ │ ╭────────────────┬─────────╮ │ │ │", + "│ │ │ │ │ external │ │ enable │ true │ │ │ │", + "│ │ │ │ │ │ │ max_results │ 100 │ │ │ │", + "│ │ │ │ │ │ │ completer │ │ │ │ │", + "│ │ │ │ │ │ ╰────────────────┴─────────╯ │ │ │", + "│ │ │ │ ╰────────────────────────┴──────────────────────────────────────╯ │ │", + "│ │ │ │ ╭───────────┬─────────╮ │ │", + "│ │ │ filesize │ │ metric │ true │ │ │", + "│ │ │ │ │ format │ auto │ │ │", + "│ │ │ │ ╰───────────┴─────────╯ │ │", + "│ │ │ │ ╭──────────────┬───────────────╮ │ │", + "│ │ │ cursor_shape │ │ emacs │ line │ │ │", + "│ │ │ │ │ vi_insert │ block │ │ │", + "│ │ │ │ │ vi_normal │ underscore │ │ │", + "│ │ │ │ ╰──────────────┴───────────────╯ │ │", + "│ │ │ │ ╭───────────────────────────────┬───────────────────────────────╮ │ │", + "│ │ │ color_config │ │ separator │ white │ │ │", + "│ │ │ │ │ │ ╭─────────┬──────╮ │ │ │", + "│ │ │ │ │ leading_trailing_space_bg │ │ attr │ n │ │ │ │", + "│ │ │ │ │ │ ╰─────────┴──────╯ │ │ │", + "│ │ │ │ │ header │ green_bold │ │ │", + "│ │ │ │ │ empty │ blue │ │ │", + "│ │ │ │ │ bool │ │ │ │", + "│ │ │ │ │ int │ white │ │ │", + "│ │ │ │ │ filesize │ │ │ │", + "│ │ │ │ │ duration │ white │ │ │", + "│ │ │ │ │ datetime │ │ │ │", + "│ │ │ │ │ range │ white │ │ │", + "│ │ │ │ │ float │ white │ │ │", + "│ │ │ │ │ string │ white │ │ │", + "│ │ │ │ │ nothing │ white │ │ │", + "│ │ │ │ │ binary │ white │ │ │", + "│ │ │ │ │ cell-path │ white │ │ │", + "│ │ │ │ │ row_index │ green_bold │ │ │", + "│ │ │ │ │ record │ white │ │ │", + "│ │ │ │ │ list │ white │ │ │", + "│ │ │ │ │ block │ white │ │ │", + "│ │ │ │ │ hints │ dark_gray │ │ │", + "│ │ │ │ │ │ ╭───────┬──────────╮ │ │ │", + "│ │ │ │ │ search_result │ │ fg │ white │ │ │ │", + "│ │ │ │ │ │ │ bg │ red │ │ │ │", + "│ │ │ │ │ │ ╰───────┴──────────╯ │ │ │", + "│ │ │ │ │ shape_and │ purple_bold │ │ │", + "│ │ │ │ │ shape_binary │ purple_bold │ │ │", + "│ │ │ │ │ shape_block │ blue_bold │ │ │", + "│ │ │ │ │ shape_bool │ light_cyan │ │ │", + "│ │ │ │ │ shape_custom │ green │ │ │", + "│ │ │ │ │ shape_datetime │ cyan_bold │ │ │", + "│ │ │ │ │ shape_directory │ cyan │ │ │", + "│ │ │ │ │ shape_external │ cyan │ │ │", + "│ │ │ │ │ shape_externalarg │ green_bold │ │ │", + "│ │ │ │ │ shape_filepath │ cyan │ │ │", + "│ │ │ │ │ shape_flag │ blue_bold │ │ │", + "│ │ │ │ │ shape_float │ purple_bold │ │ │", + "│ │ │ │ │ │ ╭──────────┬─────────────╮ │ │ │", + "│ │ │ │ │ shape_garbage │ │ fg │ #FFFFFF │ │ │ │", + "│ │ │ │ │ │ │ bg │ #FF0000 │ │ │ │", + "│ │ │ │ │ │ │ attr │ b │ │ │ │", + "│ │ │ │ │ │ ╰──────────┴─────────────╯ │ │ │", + "│ │ │ │ │ shape_globpattern │ cyan_bold │ │ │", + "│ │ │ │ │ shape_int │ purple_bold │ │ │", + "│ │ │ │ │ shape_internalcall │ cyan_bold │ │ │", + "│ │ │ │ │ shape_list │ cyan_bold │ │ │", + "│ │ │ │ │ shape_literal │ blue │ │ │", + "│ │ │ │ │ │ ╭─────────┬──────╮ │ │ │", + "│ │ │ │ │ shape_matching_brackets │ │ attr │ u │ │ │ │", + "│ │ │ │ │ │ ╰─────────┴──────╯ │ │ │", + "│ │ │ │ │ shape_nothing │ light_cyan │ │ │", + "│ │ │ │ │ shape_operator │ yellow │ │ │", + "│ │ │ │ │ shape_or │ purple_bold │ │ │", + "│ │ │ │ │ shape_pipe │ purple_bold │ │ │", + "│ │ │ │ │ shape_range │ yellow_bold │ │ │", + "│ │ │ │ │ shape_record │ cyan_bold │ │ │", + "│ │ │ │ │ shape_redirection │ purple_bold │ │ │", + "│ │ │ │ │ shape_signature │ green_bold │ │ │", + "│ │ │ │ │ shape_string │ green │ │ │", + "│ │ │ │ │ shape_string_interpolation │ cyan_bold │ │ │", + "│ │ │ │ │ shape_table │ blue_bold │ │ │", + "│ │ │ │ │ shape_variable │ purple │ │ │", + "│ │ │ │ ╰───────────────────────────────┴───────────────────────────────╯ │ │", + "│ │ │ footer_mode │ 25 │ │", + "│ │ │ float_precision │ 2 │ │", + "│ │ │ use_ansi_coloring │ true │ │", + "│ │ │ edit_mode │ emacs │ │", + "│ │ │ shell_integration │ true │ │", + "│ │ │ show_banner │ true │ │", + "│ │ │ render_right_prompt_on_last_line │ false │ │", + "│ │ │ │ ╭───────────────────────┬───────────────────────────────────────╮ │ │", + "│ │ │ hooks │ │ │ ╭──────┬─────╮ │ │ │", + "│ │ │ │ │ pre_prompt │ │ 0 │ │ │ │ │", + "│ │ │ │ │ │ ╰──────┴─────╯ │ │ │", + "│ │ │ │ │ │ ╭──────┬─────╮ │ │ │", + "│ │ │ │ │ pre_execution │ │ 0 │ │ │ │ │", + "│ │ │ │ │ │ ╰──────┴─────╯ │ │ │", + "│ │ │ │ │ │ ╭────────┬───────────────────╮ │ │ │", + "│ │ │ │ │ env_change │ │ │ ╭──────┬─────╮ │ │ │ │", + "│ │ │ │ │ │ │ PWD │ │ 0 │ │ │ │ │ │", + "│ │ │ │ │ │ │ │ ╰──────┴─────╯ │ │ │ │", + "│ │ │ │ │ │ ╰────────┴───────────────────╯ │ │ │", + "│ │ │ │ │ display_output │ │ │ │", + "│ │ │ │ ╰───────────────────────┴───────────────────────────────────────╯ │ │", + "│ │ │ │ ╭──────┬──────────────────────────────┬────────────────┬────────╮ │ │", + "│ │ │ menus │ │ # │ name │ only_buffer │ ... │ │ │", + "│ │ │ │ │ │ │ _difference │ │ │ │", + "│ │ │ │ ├──────┼──────────────────────────────┼────────────────┼────────┤ │ │", + "│ │ │ │ │ 0 │ completion_menu │ false │ ... │ │ │", + "│ │ │ │ │ 1 │ history_menu │ true │ ... │ │ │", + "│ │ │ │ │ 2 │ help_menu │ true │ ... │ │ │", + "│ │ │ │ │ 3 │ commands_menu │ false │ ... │ │ │", + "│ │ │ │ │ 4 │ vars_menu │ true │ ... │ │ │", + "│ │ │ │ │ 5 │ commands_with_description │ true │ ... │ │ │", + "│ │ │ │ ╰──────┴──────────────────────────────┴────────────────┴────────╯ │ │", + "│ │ │ │ ╭───────┬──────────────────────────────┬─────────────┬────────╮ │ │", + "│ │ │ keybindings │ │ # │ name │ modifier │ ... │ │ │", + "│ │ │ │ ├───────┼──────────────────────────────┼─────────────┼────────┤ │ │", + "│ │ │ │ │ 0 │ completion_menu │ none │ ... │ │ │", + "│ │ │ │ │ 1 │ completion_previous │ shift │ ... │ │ │", + "│ │ │ │ │ 2 │ history_menu │ control │ ... │ │ │", + "│ │ │ │ │ 3 │ next_page │ control │ ... │ │ │", + "│ │ │ │ │ 4 │ undo_or_previous_page │ control │ ... │ │ │", + "│ │ │ │ │ 5 │ yank │ control │ ... │ │ │", + "│ │ │ │ │ 6 │ unix-line-discard │ control │ ... │ │ │", + "│ │ │ │ │ 7 │ kill-line │ control │ ... │ │ │", + "│ │ │ │ │ 8 │ commands_menu │ control │ ... │ │ │", + "│ │ │ │ │ 9 │ vars_menu │ alt │ ... │ │ │", + "│ │ │ │ │ 10 │ commands_with_description │ control │ ... │ │ │", + "│ │ │ │ ╰───────┴──────────────────────────────┴─────────────┴────────╯ │ │", + "│ │ ╰─────────────────────────────────────┴──────────────────────────────────────────────────────────────────────╯ │", + "╰───────────────────────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯", + ]) + ); +} + #[test] fn test_collapse_big_0() { Playground::setup("test_expand_big_0", |dirs, sandbox| { diff --git a/crates/nu-table/src/types/expanded.rs b/crates/nu-table/src/types/expanded.rs index ac682cf8a6..52563efa3b 100644 --- a/crates/nu-table/src/types/expanded.rs +++ b/crates/nu-table/src/types/expanded.rs @@ -101,23 +101,24 @@ impl CellOutput { type CellResult = Result, ShellError>; fn expand_list(input: &[Value], cfg: Cfg<'_>) -> TableResult { - const PADDING_SPACE: usize = 2; const SPLIT_LINE_SPACE: usize = 1; - const ADDITIONAL_CELL_SPACE: usize = PADDING_SPACE + SPLIT_LINE_SPACE; - const MIN_CELL_CONTENT_WIDTH: usize = 3; + const MIN_CELL_WIDTH: usize = 3; const TRUNCATE_CONTENT_WIDTH: usize = 3; - const TRUNCATE_CELL_WIDTH: usize = TRUNCATE_CONTENT_WIDTH + PADDING_SPACE; if input.is_empty() { return Ok(None); } + let pad_width = cfg.opts.config.table.padding.left + cfg.opts.config.table.padding.right; + let extra_width = pad_width + SPLIT_LINE_SPACE; + let truncate_column_width = TRUNCATE_CONTENT_WIDTH + pad_width; + // 2 - split lines let mut available_width = cfg .opts .width .saturating_sub(SPLIT_LINE_SPACE + SPLIT_LINE_SPACE); - if available_width < MIN_CELL_CONTENT_WIDTH { + if available_width < MIN_CELL_WIDTH { return Ok(None); } @@ -136,14 +137,14 @@ fn expand_list(input: &[Value], cfg: Cfg<'_>) -> TableResult { let mut total_rows = 0usize; if !with_index && !with_header { - if available_width <= ADDITIONAL_CELL_SPACE { + if available_width <= extra_width { // it means we have no space left for actual content; // which means there's no point in index itself if it was even used. // so we do not print it. return Ok(None); } - available_width -= PADDING_SPACE; + available_width -= pad_width; let mut table = NuTable::new(input.len(), 1); table.set_index_style(get_index_style(&cfg.opts.style_computer)); @@ -186,7 +187,7 @@ fn expand_list(input: &[Value], cfg: Cfg<'_>) -> TableResult { .map(|value| value.to_expanded_string("", cfg.opts.config)) .unwrap_or_else(|| index.to_string()); let index_width = string_width(&index_value); - if available_width <= index_width + ADDITIONAL_CELL_SPACE + PADDING_SPACE { + if available_width <= index_width + extra_width + pad_width { // NOTE: we don't wanna wrap index; so we return return Ok(None); } @@ -196,7 +197,7 @@ fn expand_list(input: &[Value], cfg: Cfg<'_>) -> TableResult { index_column_width = max(index_column_width, index_width); } - available_width -= index_column_width + ADDITIONAL_CELL_SPACE + PADDING_SPACE; + available_width -= index_column_width + extra_width + pad_width; for (row, item) in input.iter().enumerate() { cfg.opts.signals.check(cfg.opts.span)?; @@ -246,12 +247,12 @@ fn expand_list(input: &[Value], cfg: Cfg<'_>) -> TableResult { index_column_width = max(index_column_width, index_width); } - if available_width <= index_column_width + ADDITIONAL_CELL_SPACE { + if available_width <= index_column_width + extra_width { // NOTE: we don't wanna wrap index; so we return return Ok(None); } - available_width -= index_column_width + ADDITIONAL_CELL_SPACE; + available_width -= index_column_width + extra_width; widths.push(index_column_width); } @@ -260,22 +261,28 @@ fn expand_list(input: &[Value], cfg: Cfg<'_>) -> TableResult { let mut rendered_column = 0; for (col, header) in headers.into_iter().enumerate() { let column = col + with_index as usize; - let extra_space = PADDING_SPACE + SPLIT_LINE_SPACE; - - if available_width <= extra_space { + if available_width <= extra_width { table.pop_column(table.count_columns() - column); - widths.pop(); truncate = true; break; } - let mut available = available_width - extra_space; + let mut available = available_width - extra_width; // We want to reserver some space for next column // If we can't fit it in it will be popped anyhow. + let is_prelast_column = col + 2 == count_columns; let is_last_column = col + 1 == count_columns; - if !is_last_column && available > TRUNCATE_CELL_WIDTH { - available -= TRUNCATE_CELL_WIDTH; + if is_prelast_column { + let need_width = MIN_CELL_WIDTH + SPLIT_LINE_SPACE; + if available > need_width { + available -= need_width; + } + } else if !is_last_column { + let need_width: usize = truncate_column_width + SPLIT_LINE_SPACE; + if available > need_width { + available -= need_width; + } } let mut total_column_rows = 0usize; @@ -311,7 +318,7 @@ fn expand_list(input: &[Value], cfg: Cfg<'_>) -> TableResult { widths.push(column_width); - available_width -= column_width + extra_space; + available_width -= column_width + extra_width; rendered_column += 1; total_rows = std::cmp::max(total_rows, total_column_rows); @@ -330,18 +337,18 @@ fn expand_list(input: &[Value], cfg: Cfg<'_>) -> TableResult { return Ok(None); } - if available_width < TRUNCATE_CELL_WIDTH { + if available_width < truncate_column_width { // back up by removing last column. // it's LIKELY that removing only 1 column will leave us enough space for a shift column. while let Some(width) = widths.pop() { table.pop_column(1); - available_width += width + PADDING_SPACE; + available_width += width + pad_width; if !widths.is_empty() { available_width += SPLIT_LINE_SPACE; } - if available_width > TRUNCATE_CELL_WIDTH { + if available_width > truncate_column_width { break; } } @@ -349,7 +356,7 @@ fn expand_list(input: &[Value], cfg: Cfg<'_>) -> TableResult { // this must be a RARE case or even NEVER happen, // but we do check it just in case. - if available_width < TRUNCATE_CELL_WIDTH { + if available_width < truncate_column_width { return Ok(None); } @@ -374,12 +381,12 @@ fn expanded_table_kv(record: &Record, cfg: Cfg<'_>) -> CellResult { let count_borders = theme.borders_has_vertical() as usize + theme.borders_has_right() as usize + theme.borders_has_left() as usize; - let padding = 2; - if key_width + count_borders + padding + padding > cfg.opts.width { + let pad = cfg.opts.config.table.padding.left + cfg.opts.config.table.padding.right; + if key_width + count_borders + pad + pad > cfg.opts.width { return Ok(None); } - let value_width = cfg.opts.width - key_width - count_borders - padding - padding; + let value_width = cfg.opts.width - key_width - count_borders - pad - pad; let mut total_rows = 0usize;