Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site smeagol.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!qantel!hplabs!sdcrdcf!oberon!smeagol!earle From: earle@smeagol.UUCP (Greg_Earle) Newsgroups: net.unix-wizards Subject: Mysterious transformation of tset(1) output on Suns Message-ID: <483@smeagol.UUCP> Date: Thu, 10-Oct-85 01:35:12 EDT Article-I.D.: smeagol.483 Posted: Thu Oct 10 01:35:12 1985 Date-Received: Mon, 14-Oct-85 04:22:42 EDT Distribution: net Organization: Spacecraft Data Systems group @ JPL, Pasadena, CA, USA Lines: 50 I have a question for the Sun gurus. When inside the window system, executing "tset -QS" directly from the shell gives output that 'knows' about the size (lines, columns) of the current window: e.g. % tset -QS; echo sun Mu|sun:li#50:co#76:cl=^L:cm=\E[%i%d;%dH:nd=\E[C:up=\E[A:am:bs:km:mi:ms: (etc.) rs=\E[s: % (line broken up for readability). Note the entries for li and co. But lo and behold; if you should try to do anything with this output, like put it between `` for use with eval, or even through a pipe or a redirected output, the output suddenly mysteriously changes back to a 'normal' sun termcap entry: % tset -QS | cat sun Mu|sun:li#34:co#80:cl=^L:cm=\E[%i%d;%dH:nd=\E[C:up=\E[A:am:bs:km:mi:ms: ( etc.) rs=\E[s: % Or: % tset -QS > /tmp/foo % cat /tmp/foo sun Mu|sun:li#34:co#80:cl=^L:cm=\E[%i%d;%dH:nd=\E[C:up=\E[A:am:bs:km:mi:ms: ( etc. ) rs=\E[s : % How/Why is this happening? more(1) seems to know about the length of the tty subwindow; you get everything from the top of the window down to the last line before more stops. Does it get it directly from the window subsystem? One reason I ask is that it seems like it could be a wonderful feature; you could put a series of statements in your .cshrc file (like the example given in the man page for tset with option -S) so each program that used $TERMCAP would know about the window limits if it wanted (I was thinking of modifying vnews(1) to do this, instead of the fixed # of lines you get). For a minute, I thought the old "can't set your parent's env from yerself" but that can't be it; you can muck all your other environment variables to your hearts content inside the (non-login) shell windows. Thanks in advance. Greg Earle ...!{{decvax,ucbvax}!sdcsvax,hplabs,allegra,trwrb}!sdcrdcf!smeagol!lorien!earle ...!{ihnp4,decvax,ucbvax}!sun!tsunami!smeagol!lorien!earle