added ssh_terminfo to copy terminfo to remote ssh host

This commit is contained in:
Lord Of Nougate 2022-05-07 13:09:19 +02:00
parent 368956107b
commit 8d37cab8d8

19
ssh_terminfo.py Executable file
View File

@ -0,0 +1,19 @@
#!/bin/python
import os
path = os.path.expanduser('~') + "/.ssh/config"
f = open(path,"r")
lines = f.readlines()
#ping -c 1 -w 1
print(lines.count())
for l in lines:
if "host " in l:
ssh_host = l.split()[1]
command = f"infocmp | ssh {ssh_host} 'tic -x /dev/stdin'"
print("Sending terminfo to: " + ssh_host)
print("Command: " + command)