9term: set TERM=dumb instead of TERM=9term

Everyone seems to assume that TERM != dumb implies
ANSI escape codes are okay. In fact, many people assume
that unconditionally, but it is easier to argue back about
TERM=dumb than TERM=9term.

This applies to acme win too, because they share the code.

Set termprog=9term or termprog=win for clients who
need to know.

R=rsc
CC=r
https://codereview.appspot.com/12532043
This commit is contained in:
Russ Cox 2013-08-06 09:42:10 -04:00
parent 2bc9a13faf
commit bf63f986ff
4 changed files with 13 additions and 1 deletions

View file

@ -77,7 +77,16 @@ rcstart(int argc, char **argv, int *pfd, int *tfd)
*/
notifyoff("sys: window size change");
putenv("TERM", "9term");
// This used to be TERM=9term but we don't know of anything that cares.
// Worse, various cc have started assuming that TERM != dumb implies
// the ability to understand ANSI escape codes. 9term will squelch them
// but acme win does not.
putenv("TERM", "dumb");
// Set $termprog to 9term or win for those who care about what kind of
// dumb terminal this is.
putenv("termprog", (char*)termprog);
pid = fork();
switch(pid){
case 0: