Automatic terminfo propagation over SSH #4156
Unanswered
dgl
asked this question in
Ideas and Issue Triage
Replies: 1 comment 2 replies
-
I just got caught by this as well - I often SSH into random hosts (my For now, I've just set |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Needing to copy terminfo to remote systems is a rather FAQ. It would be possible for the shell integration to automatically inject an SSH config which copies the config for the user.
The following is a PoC, it obviously has an awfully hacky shell function for parsing the ssh arguments and the tracking of whether it has copied the terminfo over is the silliest thing. But it proves it can work, even with more complex ssh commands like
ssh -J jump some-host
.A real implementation that does this should prompt the user before doing this on a remote system (maybe configurable via the shell integration options and also copy over the shell integration if configured to do so). It also deliberately wraps ssh as a shell function only, so this doesn't affect scripts.
In ~/.ssh/ghosty-config:
In ~/bin/ssh-ghosty-terminfo this messy script (and chmod +x it):
Then in .zshrc / bashrc (this bit could be configured by the shell integration similar to how it does for sudo):
Beta Was this translation helpful? Give feedback.
All reactions