diff -r -u screen-4.0.2/doc/screen.1 screen-4.0.2-jdw/doc/screen.1 --- screen-4.0.2/doc/screen.1 2003-12-05 07:51:57.000000000 -0600 +++ screen-4.0.2-jdw/doc/screen.1 2004-07-11 22:02:49.000000000 -0500 @@ -3290,6 +3290,8 @@ seconds .IP t window title +.IP T +window tty name .IP u all other users on this window .IP w diff -r -u screen-4.0.2/doc/screen.info-4 screen-4.0.2-jdw/doc/screen.info-4 --- screen-4.0.2/doc/screen.info-4 2003-12-05 07:52:07.000000000 -0600 +++ screen-4.0.2-jdw/doc/screen.info-4 2004-07-11 22:04:02.000000000 -0500 @@ -1195,6 +1195,9 @@ `t' window title +`T' + window tty name + `u' all other users on this window diff -r -u screen-4.0.2/doc/screen.texinfo screen-4.0.2-jdw/doc/screen.texinfo --- screen-4.0.2/doc/screen.texinfo 2003-12-05 07:51:46.000000000 -0600 +++ screen-4.0.2-jdw/doc/screen.texinfo 2004-07-11 22:02:35.000000000 -0500 @@ -4756,6 +4756,8 @@ seconds @item t window title address@hidden T +window tty name @item u all other users on this window @item w diff -r -u screen-4.0.2/screen.c screen-4.0.2-jdw/screen.c --- screen-4.0.2/screen.c 2003-09-08 09:26:41.000000000 -0500 +++ screen-4.0.2-jdw/screen.c 2004-07-11 21:52:00.000000000 -0500 @@ -2477,6 +2477,16 @@ #endif p += strlen(p) - 1; break; + case 'T': + *p = 0; + if (win && (int)strlen(win->w_tty) < l) + { + strcpy(p, win->w_tty); + if (*p) + qmflag = 1; + } + p += strlen(p) - 1; + break; case '`': case 'h': if (rec >= 10 || (*s == 'h' && (win == 0 || win->w_hstatus == 0 || *win->w_hstatus == 0)))