Re: clear command of Putty!



jayaraghavendran@xxxxxxxxx writes:
When we issue a clear command from a putty terminal. The buffers are
not cleared actually.
Only a new screen appears. But if we scroll up and see, we can still
see the command prompt from where clear command was issued and all the
commands/reports before it.

Why is it done in this manner? I found the same behaviour for vi also.

It's deliberate -- this behaviour was added in 0.54
<http://www.chiark.greenend.org.uk/~sgtatham/putty/wishlist/screen-clear.html>
(and even previous to that, the scrollback is not cleared, although the
current screen is lost).

Would you prefer screen clears to clear the scrollback, then?

This:
<http://www.chiark.greenend.org.uk/~sgtatham/putty/wishlist/term-clear-scrollback.html>
suggests that someone else has asked for this, so perhaps we should add
an option to do so (off by default).

That page also notes that Thomas Dickey's xterm extends an existing
escape sequence to allow the server to clear the scrollback
(CSI 3 J).

This should be trivial to implement in PuTTY; I guess the only reason I
haven't done it (apart from lack of time) is a slight unease at
unilateral extensions of this kind.
Does any of the readership know of any actual problems that implementing
this might cause?
.



Relevant Pages

  • Re: clear command of Putty!
    ... I was going to through Putty Code and I am unable to find where ... How is this part of pushing the current screen contents into scrollback ... sequence from the server doesn't seem to indicate anything. ... see the command prompt from where clear command was issued and all the ...
    (comp.terminals)
  • Re: how to scrollback in terminal
    ... Can somebody post how to scrollback in terminal? ... That's what Scroll Lock is for; ... that FreeBSD uses this key functionality as it has been intended, ... complete your command line and execute it. ...
    (freebsd-questions)
  • Re: how to clear scrollback history
    ... >> command only clears the current visible screen.... ... the "standard" xterm doesn't clear the scrollback area. ... Modern xterm does - clears the whole screen including the scrollback on ...
    (comp.unix.shell)