This isn't a big deal if you only need to interact with a few machines via ssh, but when you are working with 100+, including networking gear that has no hope of using a custom terminfo, it really gets to be a gnarly pain.
I must be getting old.
This isn't a big deal if you only need to interact with a few machines via ssh, but when you are working with 100+, including networking gear that has no hope of using a custom terminfo, it really gets to be a gnarly pain.
I must be getting old.
That said, and to add onto the other reply, you're in luck: OpenSSH 8.8p1 includes support¹ for setting TERM in your SSH config with SetEnv². In my experience this works fine with just the client OpenSSH being up-to-date connecting to servers with older SSH versions and terminfo databases.
In your case, you might want to use a wildcard host at the end of your file to default to a more compatible TERM variable, and then override to foot's TERM variable value for the hosts you use that do have up-to-date terminfo:
Host my-up-to-date-terminfo-host
SetEnv TERM=foot
Host *
SetEnv TERM=xterm-256color
I've been using Foot for months now and just came across this issue, so it's nice there's now a path to get the full-fledged Foot experience only where it's supported. I usually stay comfortably inside GUI Doom Emacs for most shell workflows, but it's nice to have a modern, Wayland-native, no-nonsense terminal emulator when I do break my config :P.¹ https://github.com/openssh/openssh-portable/commit/f64f8c00d...
If you don't want this, you can just use xterm-256color instead.
They need to support the common subset anyway because a lot of software looks at terminfo and assumes "mostly vt100" no matter what.
If you're using such a terminal, adding alias ssh="TERM=screen ssh" would probably fix most of your issues without sacrificing functionality in the rest of the system or relying on applications assuming your terminal is more capable than it says to be.
S=my_server ; ssh $S 'mkdir -p ~/.terminfo/f/' ; scp /usr/share/terminfo/f/foot $S:~/.terminfo/f/foot
PITA still.