bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Clear Screen


From: Bob Proulx
Subject: Re: Clear Screen
Date: Wed, 1 Dec 2010 14:04:51 -0700
User-agent: Mutt/1.5.20 (2009-06-14)

Ajay Jain wrote:
> I use bash on Xterm.
> While working you press Ctrl-L, so that the screen gets cleared and
> you see the currently line only.

That is what clearing the does.  It operates the same as the 'clear'
command line program in clearing the screen.

> But you may want to see the last outputs/prints. However, if you do
> a Ctrl-L/clear command, these prints go away.

Correct.  If you don't want the screen cleared then you will need to
avoid using Control-l to clear it.

> In that case, what can you use so that you clear the screen of the
> prints/outputs from last command. But in case you want to see the
> last output, you can just go scroll up/pageup.

Try Control-C instead.  By default that will interrupt the current
command and redraw the prompt leaving the previous output available.

If that doesn't do what you want then I don't think the functionality
you request exists.

Fundamentally there isn't any delineation between output from the
previous command and anything else you see on the screen.  The
terminal was built as a serial device with characters being typed in
from the keyboard and characters being output from the computer to the
display device.  The stream of characters being output is displayed
one after the other.  There isn't any knowledge there of what is a
prompt, what is one command output versus another command output.
Nothing keeps track of the screen at the level you are requesting to
clear characters but not to clear the characters from the previous
command.  That information does not exist.  Adding a way to track that
information is not easy and would introduce many problems and errors.
Therefore what you are asking for probably is unlikely to ever be
implemented.

Bob



reply via email to

[Prev in Thread] Current Thread [Next in Thread]