fix doc and style

This commit is contained in:
fatalerrors
2026-06-02 17:24:41 +02:00
parent df4c63657b
commit f0c62a5e7f
2 changed files with 21 additions and 11 deletions

View File

@@ -188,17 +188,24 @@ automatically at startup:
| *(absent or `smart`)* | Auto-detect the best available `terminfo` entry (default) |
| any other string | Exported as-is — standard Unix behaviour |
When auto-detection runs, emulator hints are checked in order, and the best
`terminfo` entry confirmed to exist on the system is selected:
When auto-detection runs, `COLORTERM=truecolor|24bit` is first evaluated as a
global truecolor flag. Each emulator hint is then checked in order; within each
branch a `*-direct` terminfo entry (24-bit colour) is tried before the
`*-256color` fallback. Only entries confirmed to exist via `terminfo` are used.
1. **`$COLORTERM`** — `truecolor` or `24bit` `xterm-direct`, then `xterm-256color`
2. **`$TERM_PROGRAM`** — `iTerm.app`, `WezTerm`, `Hyper`, `vscode` → appropriate entry
3. **`$VTE_VERSION`** — GNOME Terminal, Tilix, …`vte-256color`, then `xterm-256color`
4. **`$WT_SESSION`** — Windows Terminal → `xterm-256color`
5. **`$TMUX`** — tmux session → `tmux-256color`, then `screen-256color`
6. **`$STY`** — GNU screen session → `screen-256color`, then `screen`
1. **`$COLORTERM`** — `truecolor` or `24bit` sets the truecolor flag for all subsequent probes
2. **`$TERM_PROGRAM`** — emulator name hints:
- `iTerm.app``xterm-direct`¹, then `xterm-256color`
- `WezTerm``xterm-direct`¹, then `wezterm`, then `xterm-256color`
- `Hyper`, `vscode``xterm-direct`¹, then `xterm-256color`
3. **`$VTE_VERSION`** — GNOME Terminal, Tilix, … → `vte-direct`¹, then `vte-256color`, then `xterm-256color`
4. **`$WT_SESSION`** — Windows Terminal → `xterm-direct`¹, then `xterm-256color`
5. **`$TMUX`** — tmux session → `tmux-direct`¹ → `screen-direct`¹, then `tmux-256color`, then `screen-256color`
6. **`$STY`** — GNU screen session → `screen-direct`¹, then `screen-256color`, then `screen`
7. **Generic probe**`xterm-256color``xterm-color``xterm``vt100`
¹ Only attempted when the truecolor flag is set (`COLORTERM=truecolor` or `24bit`).
### 4.2. Module defaults
Each module exposes its hardcoded defaults as configuration keys. Set a key to