I use a telnet window larger than 80x24 and vi on the empeg assumes 80x24. So everytime I leave vi, the cursor is left in the middle of the screen, and every time, I type clear and every time, it says "sh: clear: command not found".

Well, here's the solution. It looks like something from an IOCCC, but at least it's nice and small and gets the job done. The binary is attached, source is here:
main(){printf("^[[H^[[J");}

note that both sets of ^[ are really escape chars, not a carat followed by a bracket.


Attachments
142161-clear (130 downloads)

_________________________
--The Amigo