3 ms·
Honestly if I had one complaint about terminals, it would be any time, every time, and how often a CLI program decides it's talking to xterm-color and the rende
by inetknght 7y ago
Honestly if I had one complaint about terminals, it would be any time, every time, and how often a CLI program decides it's talking to xterm-color and the renderer deciding for some reason that it doesn't like talking xterm, and somehow the character stream decides to "clear" the screen and move the cursor to 0,0, and none of the characters get erased and suddenly nothing is readable. It happens far too often.
I wish TMUX would be capable of noticing and either fixing or suggesting a fix for that kind of garbage.
- ohazi 7y agoCompletely agree. The problem is that there are half a dozen ways for a program to figure out where it's running, but (poorly) pattern matching on $TERM is way easier than checking for individual features with termcap. It's also almost impossible to validate a program against different environments other than just manually trying as many as you can tolerate. Also there are lots of systems with broken/incomplete/incorrect termcap databases, so now you're looking at kludgy exception lists anyway. Tmux switched from using xterm- to screen- and then tmux- as its $TERM at some point, and adding a proper termcap entry, and it's mostly been a net positive, but some things definitely break as a result. The most annoying thing is that $TERM is inherited over ssh, but the termcap db isn't, so it's not enough to have your local programs configured correctly, you need to have the same config (or at least a workaround) available on all of the remote systems you use. Tldr: xterm- is ossified, and trying to do anything else, even the correct way, is a nightmare and often can't realistically be made to work.
- syn0byte 7y ago"setterm --reset" is the command you are looking for in most *nix systems.
- inetknght 7y agoBeen there, done that. It doesn't always work. It's particularly annoying with deeply nested terminals eg, xterm -> ssh -> tmux -> tmux -> ssh ... etc).