lovefert.blogg.se

Syncterm scrollback buffer
Syncterm scrollback buffer












syncterm scrollback buffer syncterm scrollback buffer
  1. Syncterm scrollback buffer how to#
  2. Syncterm scrollback buffer manual#

I confirmed, as far as I use the official repositories, the procedure is valid on For example, $ clear -VĪnd this can be read as " ncurses 6.1 released on ".

syncterm scrollback buffer

So you can use -x option if the release date of ncurses is equal to or newer than. + add -x option to clear/tput to make the E3 extension optional I didn't see this issue with earlier to 14.04(guessing). + modify the clear program to take into account the E3 extendedĬapability to clear the terminal's scrollback buffer (patch by Short Answer: If you have relatively newer version of clear, you can avoid the scrollbuffer's being cleared by -x option. restart your terminal and clear should now no longer remove the scrollbuffer This will load your modified terminfo and store it. And from your terminal execute: sudo tic -x tempfile You are looking for: E3=\E[3J,įind this and just remove it. This will output the extended capabilities for this terminal type to 'tempfile'. Where you obviously replace xterm-256color with the output from the first command. Now enter the command: infocmp -x xterm-256color > tempfile We are going to remove this E3 capability:įirst, find out the type of your terminal: echo $TERMįor me this resulted in "xterm-256color".

Syncterm scrollback buffer manual#

If you type "man clear" you will see that the manual states:Ĭlear clears your screen if this is possible, including its scrollback buffer (if the extended "E3" capability is defined). It is very good answer which explains almost all questions asked here.This took me a while to figure out so I guess I should share how I got this to work. I tried typing Esc, then c but this does not work.

Syncterm scrollback buffer how to#

It is like a hack, rather than clean solution.Īnother question is, is there a readline command for mentioned \ec sequence? I want to bound it to C-l instead because I always want to clear scrollback buffer when I clear the screen.Īnd another question is how to just type such escape sequence into terminal, to perform desired action? Then do not have to think about binding C-l to another readline command (if such command exists). It pollutes scrollback with chunks of emptiness, so you must scroll up more, and more. What is this command? Which escape sequence it emits? How does it actually work? Does it run shell command? Or what? Again, in gnome-terminal, it seems like it works just by spiting out blank lines until prompt appear in top line of terminal. There is also readline's C-l key sequence, which by default bound to clear-screen command (I mean, readline command, not shell command).

syncterm scrollback buffer

The question is, what is \ec sequence, how it differs from what clear and reset does, and why there is no separate command for it? There is also reset, which clears, but it does a little bit more than that, and it is really slow (on my system it takes more than a second, which is significant delay for humans to be noticed).Īnd there is echo -ne '\ec' or echo -ne '\033c', which does the job. In gnome-terminal clear does not clear scrollback buffer. There is clear command, according to man,Ĭlear clears your screen if this is possible, including its scrollback buffer (if the extended "E3" capability is defined). When scrollback buffer is cleared, I can just scroll to top, and will be done. Clearing scrollback buffer is handy in many ways, for example, when I wish to run some command with long output, and want to quickly scroll to start of this output.














Syncterm scrollback buffer