mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-05-13 08:26:56 +00:00
Fix terminfo file not being used on OS X
On OS X tic has a different directory layout than on linux. Sigh.
This commit is contained in:
parent
49ea4f736d
commit
3cbb0b22dc
3 changed files with 13 additions and 4 deletions
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
import os
|
||||
import sys
|
||||
import shutil
|
||||
import subprocess
|
||||
|
||||
base = os.path.dirname(os.path.abspath(__file__))
|
||||
os.chdir(base)
|
||||
|
|
@ -13,4 +15,10 @@ with open('terminfo/kitty.terminfo', 'w') as f:
|
|||
f.write(generate_terminfo())
|
||||
|
||||
os.environ['TERMINFO'] = os.path.join(base, 'terminfo')
|
||||
os.execvp('tic', 'tic terminfo/kitty.terminfo'.split())
|
||||
subprocess.check_call(['tic', 'terminfo/kitty.terminfo'])
|
||||
# On OS X tic puts the compiled database into a different directory
|
||||
try:
|
||||
os.mkdir('terminfo/78')
|
||||
except FileExistsError:
|
||||
pass
|
||||
shutil.copy2('terminfo/x/xterm-kitty', 'terminfo/78')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue