![]() Paste bracketing is a feature that can be enabled by an app running in iTerm2 by sending a control sequence. It should be disabled if you're communicating with an untrusted party, as there are possible injection attacks. You may disable this feature by enabling this option. Programs running in a terminal may send an escape code to request the current window title. If disabled, the mouse will always perform its default action (such as scrolling history) rather than being reported to an app that has enabled mouse reporting. This can be temporarily disabled by holding down Option. If selected, applications may choose to receive information about the mouse. Text to send when the ENQ sequence is received. If xterm-256color is selected and your system is missing the terminfo file, you will be prompted to install it when you open a new session. The TERM variable will be set to this value by default. For most people, "Unicode (UTF-8)" is the right choice. When in alternate screen mode, lines that scroll off the top of the screen will be saved to the scrollback buffer only if this option is enabled. Save lines to scrollback in alternate screen mode The screen is considered to have a status bar if it has a scroll region whose top is the first line of the screen and whose bottom is above the bottom of the screen. When this setting is enabled, lines scrolled off the top of the screen in the presence of a status bar are added to the scrollback buffer. For others (like tmux) you may want to save scrolled-off lines into the scrollback buffer. For some applications (like vim) it is undesirable to save lines to the scrollback buffer when the application scrolls. Some programs (such as vim or tmux) keep a status bar at the bottom of the screen. Save lines to scrollback when an app status bar is present Unlimited scrollback will allow it to grow indefinitely, possibly using all available memory. The number of lines of scrollback buffer to keep above the visible part of the screen. bashrc:ġ) it doesn't require sudo privileges and can be easilly taken on the go.Preferences Profiles Terminal Scrollback lines I would recommend this over bashBedlam's answer of using tic, as editing. You can change the sudo bash behavior by doing sudo su before the procedure I listed. This will make so that when you are scrolling back, you'll know exactly where you used div. This makes it so that when you do the div command, it enters two dividers with 10 new lines between them, followed by a clean command. I also like to add div (for divider): alias div='echo echo "-" echo echo echo echo echo echo echo echo echo echo echo echo "-" clean' In bash, enter: nano ~/.bashrcĪnd add this line at the end: alias clean="printf '\33[H\33[2J'" This answer builds off of stingray's answer (which he did some really good work on) and is meant to complete it.ġ - To clear without loosing scrollback, enter the following command in console (no need for python as suggested in stringray's answer): printf '\33[H\33[2J'Ģ - To avoid having to memorize this, you can edit your. Raspbian Stretch Lite (This is older than Buster.).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 ". ![]() ![]() 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". 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). This took me a while to figure out so I guess I should share how I got this to work.
0 Comments
Leave a Reply. |