terminal - How to show long git output in separate buffer with less? -


When I open less , then it is in a different buffer (maybe Is there another word for this?): The scroll bar of my terminal disappears and I can scroll with the mouse wheel. , it uses the same buffer as my session, the scroll bars of the terminal remain, scrolling with the mouse wheel scrolls the session and scrolling back and forth (with the keyboard) that's all It leaves something which is ever seen in the terminal. The last thing can be easily displayed by shooting from Jammu and Kashmir, while scrolling the terminal buffer, the first row will be repeated several times.

Other devices that use less work, e.g., long output is shown from psql in a different buffer less < How do I git with / code>?

says:

core.pager < P> GIT will use to output the page. GIT_PAGER can be overridden with environment variables Note that git sets the FRSX less environment variable if it pager runs, then it is not set.

Important part is x lower variable consulting less' man page:

-X or --no-init

Disables the terminal start-up and sending the deployment string to the terminal terminal. This is sometimes desirable if the deinitialization string makes something unnecessary, such as scrubbing the screen.

So we have to disable it. Fortunately, GIT-Config (1) shows the solution:

If you want to override the default settings of at least Git, you set the core. Pager for example can do. Less - + S will be opened by it, which decreases the last command = FRSX cum - + S.

      Git config --global core.pager 'cum - + X - + F'   

This again enables the cap cap initialization to create a new buffer, unfortunately, F also becomes disabled if the output fits on the screen, then it immediately causes the exit immediately because the output is in the other buffer, the command immediately without any raid The Purchaser.

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -