On 1/5/22 11:34 AM, Phil Budne wrote:
Will Senn wrote:
so then I tryed vt50 and vt52 modes...
xterm should have VT52 emulation, at least the man page on my system says:
       o   VT52 emulation is complete.
But looking at CTRL+{LEFT,MIDDLE,RIGHT}_CLICK menus didn't show a toggle.

The VT100 sequence to enter VT52 mode seems to be <ESC>[?2l
you should be able to send it with echo.

Then <ESC>H<ESC>J should clear the screen.

NOTE! The ANSI command prefix <ESC>[ will put a real VT52 into "hold
screen" mode where you need to press some (scroll?) button to allow
new lines to be added at the bottom of the screen.  Ask me how I know!

phil
Well, is there no end to fascination... That 'worked' in that I was able to do this in n xterm on my mac:
printf "\033[?2l"

which changed the size of the xterm window to 80 chars wide... then:
printf "\033H\033J"

which cleared the screen as you said it would.

But, then, I telnet'd into the the v7 instance and set TERM=vt52, etc.

Now vi gives this:
Y7 HJY- ~
        ~
        ~
        ~
        ~
        ~
        ~
        ~
        ~
        ~Y,


However, I should note that v7 doesn't seem to process escape sequences, either with a pristine instance or my fully configured instance...
echo '\033'
\033

$ ed test
?test
a
<ESC>J (just echoes the J)
.
w
3
q
$ od -c test
0000000 033   J  \n  \0
0000003