From 9378e3aa56cb7afd8204c0641ca3356162effc09 Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Tue, 23 Jun 2026 21:30:07 +1000 Subject: [PATCH] Restructure terminfo guidance When reading the docs, I accidentally interpreted the numbered list as a sequence of steps, instead of alternatives. This change breaks up the separate workaround methods, and clarifies the step required if `tic` adds the terminal info to the user's home (just move it) --- docs/help/terminfo.mdx | 58 ++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/docs/help/terminfo.mdx b/docs/help/terminfo.mdx index 09355036..5e533906 100644 --- a/docs/help/terminfo.mdx +++ b/docs/help/terminfo.mdx @@ -56,40 +56,26 @@ terminal: xterm-ghostty`, `Error opening terminal: xterm-ghostty.` or `WARNING: terminal is not fully functional`. Hopefully someday Ghostty will have terminfo entries pre-distributed -everywhere, but in the meantime there are two ways to resolve the situation: +everywhere, but in the meantime there are two methods to resolve the situation: -1. Copy Ghostty's terminfo entry to the remote machine. The easiest way is using - the following one-liner: +### Method 1: Copy Ghostty's terminfo entry to the remote machine +1. On your local machine, run the following one-liner: ```sh infocmp -x xterm-ghostty | ssh YOUR-SERVER -- tic -x - ``` -2. Configure SSH to fall back to a known terminfo entry using the following SSH - configuration (**requires [OpenSSH 8.7](https://www.openssh.com/txt/release-8.7) - or newer**): - ```ssh-config - # .ssh/config - Host example.com - SetEnv TERM=xterm-256color - ``` +2. On the server, confirm the configuration was saved into + `/usr/share/terminfo/...`. + If not, check `$HOME/.terminfo/...` and move it across. -Ghostty can automate both variants. See [SSH](/docs/features/ssh) for -details on the `ghostty +ssh` CLI action and the `ssh-env` / -`ssh-terminfo` shell integration features, including important -limitations around when the automation applies. +The `tic` command on the server may give the warning `"", line 2, col 31, terminal +'xterm-ghostty': older tic versions may treat the description +field as an alias` which can be safely ignored. - - The `tic` command on the server may give the warning `"", line 2, - col 31, terminal 'xterm-ghostty': older tic versions may treat the description - field as an alias` which can be safely ignored. - - - - `tic` will normally place its results in the system database, - `/usr/share/terminfo`. This location can be overridden with the `TERMINFO` - environment variable. If `TERMINFO` is not set and `tic` cannot write to the - system location, it will place the results in `$HOME/.terminfo` if it exists. - `man tic` for details. - +`tic` will normally place its results in the system database, `/usr/share/terminfo`. +This location can be overridden with the `TERMINFO` environment variable. +If `TERMINFO` is not set and `tic` cannot write to the +system location, it will place the results in `$HOME/.terminfo` if it exists. +If this happens, `man tic` for details. **macOS versions before Sonoma cannot use the system-bundled `infocmp`.** The @@ -101,6 +87,22 @@ limitations around when the automation applies. `/usr/local/opt/ncurses/bin/infocmp`. + +### Method 2: Configure SSH to fall back to a known terminfo entry +1. On your local machine, add the following SSH + configuration (**requires [OpenSSH 8.7](https://www.openssh.com/txt/release-8.7) + or newer**): + ```ssh-config + # .ssh/config + Host example.com + SetEnv TERM=xterm-256color + ``` + +Ghostty can automate both variants. See [SSH](/docs/features/ssh) for +details on the `ghostty +ssh` CLI action and the `ssh-env` / +`ssh-terminfo` shell integration features, including important +limitations around when the automation applies. + **Fallback does not support advanced terminal features.** Because `xterm-256color` does not include all of Ghostty's capabilities, terminal