git: 3ceb5f150bc1 - main - termcap: add missing capabilities to the xterm-ghostty entry
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 12 Oct 2026 07:52:11 UTC
The branch main has been updated by delphij:
URL: https://cgit.FreeBSD.org/src/commit/?id=3ceb5f150bc121f5e6a3e0cc8b289279338405a1
commit 3ceb5f150bc121f5e6a3e0cc8b289279338405a1
Author: Xin LI <delphij@FreeBSD.org>
AuthorDate: 2026-10-12 07:51:43 +0000
Commit: Xin LI <delphij@FreeBSD.org>
CommitDate: 2026-10-12 07:51:43 +0000
termcap: add missing capabilities to the xterm-ghostty entry
The entry was imported from the termcap source that Ghostty generates
with infotocap during its build. To fit within 1023 bytes, the
conversion dropped a number of capabilities, most notably all color
support, so termcap consumers such as ls -G and ncurses applications
treated Ghostty as a monochrome terminal.
Split the entry into xterm-ghostty and a ghostty+common fragment, and
restore the following from Ghostty's terminfo definition:
- colors: Co, pa, AF, AB, op, oc, ut, AX
- keys: End, keypad Enter, F10-F12, back tab, mouse prefix
- attributes: italics (ZH/ZR), invisible (mk), acsc map (ac)
- misc: cb, ch, cv, SA/RA, r1, bs, NP, 5i
AF and AB use the plain 256-color form, like xterm-256color, because
termcap cannot express the conditional used by the terminfo entry.
Fixes: 804f961c5cdd ("share/termcap: add xterm-ghostty entry")
MFC after: 1 week
---
share/termcap/termcap | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/share/termcap/termcap b/share/termcap/termcap
index 46a1ba0a59bd..42a19268f3e0 100644
--- a/share/termcap/termcap
+++ b/share/termcap/termcap
@@ -4824,7 +4824,15 @@ alacritty+common|base fragment for alacritty:\
# From Tim Culverhouse <tim@timculverhouse.com>
xterm-ghostty|ghostty|Ghostty:\
- :am:hs:km:mi:ms:xn:\
+ :ut:AX:NP:5i:\
+ :Co#256:pa#32767:\
+ :AB=\E[48;5;%dm:AF=\E[38;5;%dm:\
+ :ac=++,,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~:\
+ :oc=\E]104\007:op=\E[39;49m:r1=\E]\E\\\Ec:\
+ :tc=ghostty+common:
+
+ghostty+common|base fragment for ghostty:\
+ :am:bs:hs:km:mi:ms:xn:\
:co#80:it#8:li#24:\
:AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:IC=\E[%d@:\
:LE=\E[%dD:RI=\E[%dC:SF=\E[%dS:SR=\E[%dT:UP=\E[%dA:\
@@ -4839,7 +4847,10 @@ xterm-ghostty|ghostty|Ghostty:\
:mh=\E[2m:mr=\E[7m:nd=\E[C:rc=\E8:sc=\E7:se=\E[27m:sf=\n:\
:so=\E[7m:sr=\EM:st=\EH:ta=^I:te=\E[?1049l:ti=\E[?1049h:\
:ts=\E]2;:ue=\E[24m:up=\E[A:us=\E[4m:vb=\E[?5h\E[?5l:\
- :ve=\E[?12l\E[?25h:vi=\E[?25l:vs=\E[?12;25h:
+ :ve=\E[?12l\E[?25h:vi=\E[?25l:vs=\E[?12;25h:\
+ :@7=\EOF:@8=\EOM:F1=\E[23~:F2=\E[24~:Km=\E[<:RA=\E[?7l:\
+ :SA=\E[?7h:ZH=\E[3m:ZR=\E[23m:cb=\E[1K:ch=\E[%i%dG:\
+ :cv=\E[%i%dd:k;=\E[21~:kB=\E[Z:mk=\E[8m:
#
# END OF TERMCAP