VKontakte.DJ
forum traveling
 

Celestial Software

...better by design

Home Support SSH Client Forums
Welcome, Guest
Please Login or Register.    Lost Password?
scrollback buffer erased on clear command (1 viewing) (1) Guest
Go to bottom Favoured: 0
TOPIC: scrollback buffer erased on clear command
#1373
scrollback buffer erased on clear command 18 Years, 7 Months ago  
I have found that when a "clear" command is issued at the unix/linux command prompt, the porion of the history buffer currently displayed onscreen is erased from the history buffer as well. Is there a way to prevent the current screen from being erased from history upon issue of a unix 'clear' command?
tcocke (User)
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
Logged Logged  
 
The administrator has disabled public write access.  
#1374
Re: scrollback buffer erased on clear command 18 Years, 7 Months ago  
I have slso noticed the same symptom in linux when a vi is performed. The screen is cleared which is normal, but the current screen on display prior to the vi being issued is subsequently missing from the scrollback history.
tcocke (User)
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
Logged Logged  
 
The administrator has disabled public write access.  
#1375
Re: scrollback buffer erased on clear command 18 Years, 7 Months ago  
Tony,

The scrollback is simply a history of stuff that has scrolled off the screen. When the screen is cleared, it doesn't scroll at all, the data simply disappears.

It would be a mistake to blindly force a 'clear' to scroll all of the data off. For instance, many apps issue clears throughout the run of the app, which would thorougly trash the scrollback if each one forced data up into the scrollback.

If you want, you can apply some unix trickery to do what you want. For example, create an alias or a wrapper around the 'vi' command to issue the proper number of carriage returns before running vi. This will cause the screen to scroll, preserving the current page in the scrollback history prior to vi clearing the screen.
bpence (Admin)
Admin
Posts: 1404
graph
User Offline Click here to see the profile of this user
Logged Logged  
 
Brian Pence
Celestial Software
SSH , SFTP, and Telnet in a tabbed interface for Windows XP, Vista, Mobile, and others
 
The administrator has disabled public write access.  
#1376
Re: scrollback buffer erased on clear command 18 Years, 7 Months ago  
Brian,
Thanks for the response. I guess I can see your point that in certain apps you would not want to keep the display on a clear, but for someone working from a linux shell, simply doing command line grunt work like pg and ls and vi, it is very useful to be able to see ALL info that has been displayed, especially the most current lines prior to a vi command. We are about to switch to Absolute in our shop from Procomm (which does not erase the current screen from history on a clear BTW) and this feature would be invaluable to our programmers.

Thanks,
Tony
tcocke (User)
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
Logged Logged  
 
The administrator has disabled public write access.  
#1377
Re: scrollback buffer erased on clear command 18 Years, 7 Months ago  
Tony,

I think the proper way to do this is to make vi (and others) use the alternate screen buffer. Then, when they exit, the contents of the current screen are restored. In other words, I believe that changing the behavior of the clear screen has implications in to many places and risks polluting the scrollback, but there are believe that there are still ways to do what you want to do.

This alternate screen buffer seems to be the default behavior on Linux if you're using xterm as your terminal type, but there may be other factors involved.

What host OS are you using?

Which shell?

Brian
bpence (Admin)
Admin
Posts: 1404
graph
User Offline Click here to see the profile of this user
Logged Logged  
 
Brian Pence
Celestial Software
SSH , SFTP, and Telnet in a tabbed interface for Windows XP, Vista, Mobile, and others
 
The administrator has disabled public write access.  
Go to top