Greg Wooledge wrote: > ... I can see where his question is coming from. If you're on an > rxvt or something, with a reasonably-sized scrollback buffer, and > you do a "tput clear" or its equivalent, you only lose the lines > that were on the visible part of the terminal at that time -- the > rest of the scrollback buffer is still there.
XTerm behaves the same, FWIW. Personally when I want that I just hold down the Enter key and push everything up and off the top. > Perhaps the best solution for the original question is to send ${LINES:-24} > newline characters to the terminal instead of clearing it. That should > push the information that's currently visible "up" into the scrollback > buffer, where he wants it to be. That seems possible. Create a routine that does exactly that and then bind it to the clear-screen function currently attached to C-l. Then it would work as you describe. I have never done that, don't know how, but it seems reasonable to me. :-) Bob