Skip to content

Commit 18cf302

Browse files
authored
Update table border configuration docs (nushell#1774)
* Update table border configuration docs * Fix example
1 parent b9f71af commit 18cf302

File tree

1 file changed

+39
-13
lines changed

1 file changed

+39
-13
lines changed

book/coloring_and_theming.md

Lines changed: 39 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,55 @@ Many parts of Nushell's interface can have their color customized. All of these
44

55
## Table Borders
66

7-
Table borders are controlled by the `$env.config.table.mode` setting in `config.nu`. Here is an example:
7+
Table borders are controlled by the `$env.config.table.mode` setting. It can be changed at run time, or in the `config.nu` file:
88

99
```nu
10-
$env.config = {
11-
table: {
12-
mode: rounded
13-
}
14-
}
10+
$env.config.table.mode = 'rounded'
1511
```
1612

17-
Here are the current options for `$env.config.table.mode`:
13+
The options for `$env.config.table.mode` can be listed with `table --list`:
14+
15+
<!-- Generated with table --list | each {|| $"- `($in)`"} | sort | str join "\n"` -->
1816

19-
- `rounded` # of course, this is the best one :)
17+
- `ascii_rounded`
18+
- `basic_compact`
2019
- `basic`
21-
- `compact`
2220
- `compact_double`
21+
- `compact`
22+
- `default`
23+
- `dots`
24+
- `heavy`
2325
- `light`
26+
- `markdown`
27+
- `none`
28+
- `psql`
29+
- `reinforced`
30+
- `restructured`
31+
- `rounded`
2432
- `thin`
2533
- `with_love`
26-
- `reinforced`
27-
- `heavy`
28-
- `none`
29-
- `other`
34+
35+
Examples:
36+
37+
```nu
38+
$env.config.table.mode = 'rounded'
39+
table --list | first 5
40+
# => ╭───┬────────────────╮
41+
# => │ 0 │ basic │
42+
# => │ 1 │ compact │
43+
# => │ 2 │ compact_double │
44+
# => │ 3 │ default │
45+
# => │ 4 │ heavy │
46+
# => ╰───┴────────────────╯
47+
48+
$env.config.table.mode = 'psql'
49+
table --list | first 5
50+
# => 0 | basic
51+
# => 1 | compact
52+
# => 2 | compact_double
53+
# => 3 | default
54+
# => 4 | heavy
55+
```
3056

3157
## Color Configuration
3258

0 commit comments

Comments
 (0)