Clear Screen

2010-12-01 Thread Ajay Jain
Hi,

I use bash on Xterm.
While working you press Ctrl-L, so that the screen gets cleared and
you see the currently line only. But you may want to see the last
outputs/prints. However, if you do a Ctrl-L/clear command, these
prints go away. 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.

I looked at the bash  Xterm manpage but this info is not available.

Thanks in Advance,
Ajay

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Clear Screen

2010-12-01 Thread Andy Koppe
On 1 December 2010 11:34, 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. But you may want to see the last
 outputs/prints. However, if you do a Ctrl-L/clear command, these
 prints go away. 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.

 I looked at the bash  Xterm manpage but this info is not available.

Yep, looks like xterm doesn't push the screen content into the
scrollback when clearing the screen, and I can't see an option for it
either. You may want to try mintty, which does do what you expect (and
which doesn't require X).

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Clear Screen

2010-12-01 Thread Thomas Dickey

On Wed, 1 Dec 2010, Ajay Jain wrote:


Hi,

I use bash on Xterm.
While working you press Ctrl-L, so that the screen gets cleared and
you see the currently line only. But you may want to see the last
outputs/prints. However, if you do a Ctrl-L/clear command, these
prints go away. 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.

I looked at the bash  Xterm manpage but this info is not available.


The closest I recall offhand is the xterm tiXtraScroll resource (which 
would be useful if you were asking about running vi, etc).  But a 
screen-clear is done without causing any scrolling action.


By the way, the clearing of the screen on ctrl/L is not done by xterm.
(PuTTY does this, in case you're mistaking it for xterm, otherwise
I'd assume bash is doing it).

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Clear Screen

2010-12-01 Thread Andy Koppe
On 1 December 2010 21:24, Thomas Dickey wrote:
 By the way, the clearing of the screen on ctrl/L is not done by xterm.
 (PuTTY does this, in case you're mistaking it for xterm, otherwise
 I'd assume bash is doing it).

Yep, bash sends '\e[2J' when ^L is pressed. PuTTY's behaviour of
interpreting ^L as formfeed is due to its SCOANSI mode being enabled
by default. (Strange that the VT100 interpreted ^L, which of course is
ASCII formfeed, as linefeed instead.)

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Clear Screen

2010-12-01 Thread Thomas Dickey

On Wed, 1 Dec 2010, Andy Koppe wrote:


On 1 December 2010 21:24, Thomas Dickey wrote:

By the way, the clearing of the screen on ctrl/L is not done by xterm.
(PuTTY does this, in case you're mistaking it for xterm, otherwise
I'd assume bash is doing it).


Yep, bash sends '\e[2J' when ^L is pressed. PuTTY's behaviour of
interpreting ^L as formfeed is due to its SCOANSI mode being enabled
by default. (Strange that the VT100 interpreted ^L, which of course is
ASCII formfeed, as linefeed instead.)


yes - it used to be that only printers did form-feeds, and terminals did 
not.  See my comment about a repaginator here:


http://invisible-island.net/personal/oldprogs.html

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/