As described in http://www.reddit.com/r/programming/comments/137kd9/18_months_ago_termkit_a_nextgeneration_terminal/c71kkpm one big issue today is that nobody actually uses TERM correctly because everything is too broken when you change it. An alternative would be to have a new escape code which queries various terminal capabilities.
It might work with a canonical list of capabilities indexed. Then the client could send the query code for any capability it wanted to know about. A standard response to an unknown capability would be, say, zero. It is assumed and would be documented, that the client would understand what the valid results are.
As described in http://www.reddit.com/r/programming/comments/137kd9/18_months_ago_termkit_a_nextgeneration_terminal/c71kkpm one big issue today is that nobody actually uses TERM correctly because everything is too broken when you change it. An alternative would be to have a new escape code which queries various terminal capabilities. It might work with a canonical list of capabilities indexed. Then the client could send the query code for any capability it wanted to know about. A standard response to an unknown capability would be, say, zero. It is assumed and would be documented, that the client would understand what the valid results are.