From c1b13667f7a1fc49570bd2f48c9d0af3d9dc0bcb Mon Sep 17 00:00:00 2001 From: "seaturtle[bot]" Date: Sun, 5 Jul 2026 18:57:58 -0500 Subject: [PATCH] fix(shell): add ssh.terminfo.push to ship xterm-kitty terminfo to remotes - plain ssh exports TERM=xterm-kitty to remotes that lack the terminfo, so they fail with "unknown terminal type" + broken colors/keys - ssh.terminfo.push user@host compiles kitty terminfo into the remote ~/.terminfo once, no per-connect wrapper or extra runtime dependency - fewer dependencies than aliasing ssh -> kitten ssh; works for plain ssh/scp/rsync and from any terminal context Co-authored-by: ulad kasach --- src/bash_aliases.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/bash_aliases.sh b/src/bash_aliases.sh index 57d66b2..5352a4d 100644 --- a/src/bash_aliases.sh +++ b/src/bash_aliases.sh @@ -8,6 +8,16 @@ alias vim='nvim' alias vi='nvim' +# push kitty's xterm-kitty terminfo to a remote host (one-time per host), +# so plain ssh/scp/rsync into it no longer fail with "unknown terminal type". +# .why = remotes lack kitty's terminfo; ship the entry once, no ssh wrapper. +# usage: ssh.terminfo.push user@host +alias ssh.terminfo.push='_ssh_terminfo_push' +_ssh_terminfo_push() { + [[ -z "$1" ]] && { echo "usage: ssh.terminfo.push user@host"; return 2; } + infocmp -x xterm-kitty | ssh "$1" 'tic -x -o ~/.terminfo /dev/stdin' +} + # open notes alias notes='nvim ~/git/notes/main.txt'