Skip to content

Commit fc16bf7

Browse files
luisdavimgdamore
authored andcommitted
fix: add tmux-256color terminfo
1 parent a421d7b commit fc16bf7

File tree

2 files changed

+68
-1
lines changed

2 files changed

+68
-1
lines changed

terminfo/models.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pcansi
1414
rxvt,rxvt-256color,rxvt-88color,rxvt-unicode,rxvt-unicode-256color
1515
screen,screen-256color
1616
st,st-256color|simpleterm
17-
tmux
17+
tmux,tmux-256color
1818
vt52
1919
vt100
2020
vt102

terminfo/t/tmux/term.go

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,71 @@ func init() {
7272
DottedUnderline: "\x1b[4:4m",
7373
DashedUnderline: "\x1b[4:5m",
7474
})
75+
76+
// tmux with 256 colors
77+
terminfo.AddTerminfo(&terminfo.Terminfo{
78+
Name: "tmux-256color",
79+
Columns: 80,
80+
Lines: 24,
81+
Colors: 256,
82+
Bell: "\a",
83+
Clear: "\x1b[H\x1b[J",
84+
EnterCA: "\x1b[?1049h",
85+
ExitCA: "\x1b[?1049l",
86+
ShowCursor: "\x1b[34h\x1b[?25h",
87+
HideCursor: "\x1b[?25l",
88+
AttrOff: "\x1b[m\x0f",
89+
Underline: "\x1b[4m",
90+
Bold: "\x1b[1m",
91+
Dim: "\x1b[2m",
92+
Italic: "\x1b[3m",
93+
Blink: "\x1b[5m",
94+
Reverse: "\x1b[7m",
95+
EnterKeypad: "\x1b[?1h\x1b=",
96+
ExitKeypad: "\x1b[?1l\x1b>",
97+
SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m",
98+
SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m",
99+
SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m",
100+
ResetFgBg: "\x1b[39;49m",
101+
PadChar: "\x00",
102+
AltChars: "++,,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
103+
EnterAcs: "\x0e",
104+
ExitAcs: "\x0f",
105+
EnableAcs: "\x1b(B\x1b)0",
106+
StrikeThrough: "\x1b[9m",
107+
Mouse: "\x1b[M",
108+
SetCursor: "\x1b[%i%p1%d;%p2%dH",
109+
CursorBack1: "\b",
110+
CursorUp1: "\x1bM",
111+
KeyUp: "\x1bOA",
112+
KeyDown: "\x1bOB",
113+
KeyRight: "\x1bOC",
114+
KeyLeft: "\x1bOD",
115+
KeyInsert: "\x1b[2~",
116+
KeyDelete: "\x1b[3~",
117+
KeyBackspace: "\x7f",
118+
KeyHome: "\x1b[1~",
119+
KeyEnd: "\x1b[4~",
120+
KeyPgUp: "\x1b[5~",
121+
KeyPgDn: "\x1b[6~",
122+
KeyF1: "\x1bOP",
123+
KeyF2: "\x1bOQ",
124+
KeyF3: "\x1bOR",
125+
KeyF4: "\x1bOS",
126+
KeyF5: "\x1b[15~",
127+
KeyF6: "\x1b[17~",
128+
KeyF7: "\x1b[18~",
129+
KeyF8: "\x1b[19~",
130+
KeyF9: "\x1b[20~",
131+
KeyF10: "\x1b[21~",
132+
KeyF11: "\x1b[23~",
133+
KeyF12: "\x1b[24~",
134+
KeyBacktab: "\x1b[Z",
135+
Modifiers: 1,
136+
AutoMargin: true,
137+
DoubleUnderline: "\x1b[4:2m",
138+
CurlyUnderline: "\x1b[4:3m",
139+
DottedUnderline: "\x1b[4:4m",
140+
DashedUnderline: "\x1b[4:5m",
141+
})
75142
}

0 commit comments

Comments
 (0)