From df8e95852bcf2cef7cb34d6baf57fdb85a301ef0 Mon Sep 17 00:00:00 2001 From: Jan Klass Date: Sun, 2 Feb 2025 15:50:14 +0100 Subject: [PATCH 1/2] Update table border configuration docs --- book/coloring_and_theming.md | 49 ++++++++++++++++++++++++++---------- 1 file changed, 36 insertions(+), 13 deletions(-) diff --git a/book/coloring_and_theming.md b/book/coloring_and_theming.md index 55f2f7031ed..a1019ff5b24 100644 --- a/book/coloring_and_theming.md +++ b/book/coloring_and_theming.md @@ -10,29 +10,52 @@ Many parts of Nushell's interface can have their color customized. All of these ## Table Borders -Table borders are controlled by the `$env.config.table.mode` setting in `config.nu`. Here is an example: +Table borders are controlled by the `$env.config.table.mode` setting. It can be changed at run time, or in the `config.nu` file: ```nu -$env.config = { - table: { - mode: rounded - } -} +$env.config.table.mode = 'rounded' ``` -Here are the current options for `$env.config.table.mode`: +The options for `$env.config.table.mode` can be listed with `table --list`: + + -- `rounded` # of course, this is the best one :) +- `ascii_rounded` +- `basic_compact` - `basic` -- `compact` - `compact_double` +- `compact` +- `default` +- `dots` +- `heavy` - `light` +- `markdown` +- `none` +- `psql` +- `reinforced` +- `restructured` +- `rounded` - `thin` - `with_love` -- `reinforced` -- `heavy` -- `none` -- `other` + +Examples: + +```nu +> $env.config.table.mode = 'rounded' +╭───┬────────────────╮ +│ 0 │ basic │ +│ 1 │ compact │ +│ 2 │ compact_double │ +│ 3 │ default │ +│ 4 │ heavy │ +╰───┴────────────────╯ +> $env.config.table.mode = 'psql' | first 5 + 0 | basic + 1 | compact + 2 | compact_double + 3 | default + 4 | heavy + ``` ### Color Symbologies From 0034a8e842686e27a6e73dddf64ccb6e254125e6 Mon Sep 17 00:00:00 2001 From: Jan Klass Date: Mon, 3 Feb 2025 18:21:44 +0100 Subject: [PATCH 2/2] Fix example --- book/coloring_and_theming.md | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/book/coloring_and_theming.md b/book/coloring_and_theming.md index a1019ff5b24..8de95a035c8 100644 --- a/book/coloring_and_theming.md +++ b/book/coloring_and_theming.md @@ -41,21 +41,24 @@ The options for `$env.config.table.mode` can be listed with `table --list`: Examples: ```nu -> $env.config.table.mode = 'rounded' -╭───┬────────────────╮ -│ 0 │ basic │ -│ 1 │ compact │ -│ 2 │ compact_double │ -│ 3 │ default │ -│ 4 │ heavy │ -╰───┴────────────────╯ -> $env.config.table.mode = 'psql' | first 5 - 0 | basic - 1 | compact - 2 | compact_double - 3 | default - 4 | heavy - ``` +$env.config.table.mode = 'rounded' +table --list | first 5 +# => ╭───┬────────────────╮ +# => │ 0 │ basic │ +# => │ 1 │ compact │ +# => │ 2 │ compact_double │ +# => │ 3 │ default │ +# => │ 4 │ heavy │ +# => ╰───┴────────────────╯ + +$env.config.table.mode = 'psql' +table --list | first 5 +# => 0 | basic +# => 1 | compact +# => 2 | compact_double +# => 3 | default +# => 4 | heavy +``` ### Color Symbologies