Every time I see discussions about terminal control sequences and Unix, I can not help but be reminded of Johnny Zweig's eloquent analysis, as quoted in The Unix Haters Handboodk. https://web.mit.edu/~simsong/www/ugh.pdf
Forcing programmers to be aware of how their programs talk to terminals is medieval, to say the least. Johnny Zweig put it rather bluntly: Date: 2 May 90 17:23:34 GMT From: zw...@casca.cs.uiuc.edu (Johnny Zweig) Subject: /etc/termcap Newsgroups: alt.peeves In my opinion as a scientist as well as a software engineer, there is no reason in the world anyone should have to know /etc/termcap even EXISTS, let alone have to muck around with setting the right environment variables so that it is possible to vi a file. Some airhead has further messed up my life by seeing to it that most termcaps have the idea that "xterm" is an 80x65 line display. For those of us who use the X WINDOWS system to display WINDOWS on our workstations, 80x65 makes as much sense as reclining bucket seats on a bicycle — they are too goddamn big to fit enough of them on the screen. This idiot should be killed twice. It seems like figuring out what the hell kind of terminal I am using is not as hard as, say, launching nuclear missiles to within 10 yards of their targets, landing men on the moon or, say, Tetris. Why the hell hasn't this bull been straightened out after 30 goddamn years of sweat, blood, and tears on the part of people trying to write software that doesn't give its users the heebie-jeebies? And the first person who says "all you have to do is type 'eval resize' " gets a big sock in the nose for being a clueless geek who missed the point. This stuff ought to be handled 1 1 levels of software below the level at which a user types a command — the goddamned HARDWARE ought to be able to figure out what kind of terminal it is, and if it can't it should put a message on my console saying, "You are using piss-poor hardware and are a loser; give up and get a real job." — Johnny Terminal