Why is less being run unnecessarily by git?`less` performs differently when invoked from Bash and from GitStop Git submodule foreach from opening less for each moduleHow did `git pull` eat my homework?Terminating GitRun git fetch after any cd commandgit does not exclude .git directory`less` performs differently when invoked from Bash and from Gitgit grep output is buffered. Why?
Most practical knots for hitching a line to an object while keeping the bitter end as tight as possible, without sag?
Why didn’t Doctor Strange stay in the original winning timeline?
How does turbine efficiency compare with internal combustion engines if all the turbine power is converted to mechanical energy?
What brought these couples together?
On the feasibility of space battleships
Are required indicators necessary for radio buttons?
How to avoid using System.String with Rfc2898DeriveBytes in C#
What is this symbol: semicircles facing eachother
Sleeping solo in a double sleeping bag
Is there any practical application for performing a double Fourier transform? ...or an inverse Fourier transform on a time-domain input?
Brexit and backstop: would changes require unanimous approval by all EU countries? Does Ireland hold a veto?
Script that helps people make better choices
Church Booleans
Concatenation of the result of a function with a mutable default argument in python
A square inside an equilateral triangle
Table caption in the middle of the table
Shouldn't the "credit score" prevent Americans from going deeper and deeper into personal debt?
If the first law of thermodynamics ensures conservation of energy, why does it allow systems to lose energy?
Is “I am getting married with my sister” ambiguous?
What to say to a student who has failed?
Why aren't RCS openings an issue for spacecraft heat shields?
Why don't electrons take the shorter path in coils
How much code would a codegolf golf if a codegolf could golf code?
Science fiction short story where aliens contact a drunk about Earth's impending destruction
Why is less being run unnecessarily by git?
`less` performs differently when invoked from Bash and from GitStop Git submodule foreach from opening less for each moduleHow did `git pull` eat my homework?Terminating GitRun git fetch after any cd commandgit does not exclude .git directory`less` performs differently when invoked from Bash and from Gitgit grep output is buffered. Why?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
When I run git branch
(from bash or csh), it automagically pipes the output through less
. However, with only a few branches in the repository this is beyond unnecessary, it is annoying, as the branch listing disappears once I quit less.
Checking ~/.gitconfig
file and the local .git/config
files finds nothing about a pager or any thing else that would cause this. Otherwise, nothing I've found in web searches has been helpful or promising.
Why is this happening, and what (if anything) can I do to make less
run when needed (e.g. when doing a git log
when there's a lot of history) but not otherwise (like a git branch
with only 2 or 3 branches)?
git
add a comment |
When I run git branch
(from bash or csh), it automagically pipes the output through less
. However, with only a few branches in the repository this is beyond unnecessary, it is annoying, as the branch listing disappears once I quit less.
Checking ~/.gitconfig
file and the local .git/config
files finds nothing about a pager or any thing else that would cause this. Otherwise, nothing I've found in web searches has been helpful or promising.
Why is this happening, and what (if anything) can I do to make less
run when needed (e.g. when doing a git log
when there's a lot of history) but not otherwise (like a git branch
with only 2 or 3 branches)?
git
In general git doesn't know how much output there is going to be from any command, so it send everything by default through a pager, which will probably be less.
– icarus
4 hours ago
add a comment |
When I run git branch
(from bash or csh), it automagically pipes the output through less
. However, with only a few branches in the repository this is beyond unnecessary, it is annoying, as the branch listing disappears once I quit less.
Checking ~/.gitconfig
file and the local .git/config
files finds nothing about a pager or any thing else that would cause this. Otherwise, nothing I've found in web searches has been helpful or promising.
Why is this happening, and what (if anything) can I do to make less
run when needed (e.g. when doing a git log
when there's a lot of history) but not otherwise (like a git branch
with only 2 or 3 branches)?
git
When I run git branch
(from bash or csh), it automagically pipes the output through less
. However, with only a few branches in the repository this is beyond unnecessary, it is annoying, as the branch listing disappears once I quit less.
Checking ~/.gitconfig
file and the local .git/config
files finds nothing about a pager or any thing else that would cause this. Otherwise, nothing I've found in web searches has been helpful or promising.
Why is this happening, and what (if anything) can I do to make less
run when needed (e.g. when doing a git log
when there's a lot of history) but not otherwise (like a git branch
with only 2 or 3 branches)?
git
git
edited 2 hours ago


Bart
1,3261 gold badge3 silver badges18 bronze badges
1,3261 gold badge3 silver badges18 bronze badges
asked 8 hours ago
GreenMattGreenMatt
3102 silver badges10 bronze badges
3102 silver badges10 bronze badges
In general git doesn't know how much output there is going to be from any command, so it send everything by default through a pager, which will probably be less.
– icarus
4 hours ago
add a comment |
In general git doesn't know how much output there is going to be from any command, so it send everything by default through a pager, which will probably be less.
– icarus
4 hours ago
In general git doesn't know how much output there is going to be from any command, so it send everything by default through a pager, which will probably be less.
– icarus
4 hours ago
In general git doesn't know how much output there is going to be from any command, so it send everything by default through a pager, which will probably be less.
– icarus
4 hours ago
add a comment |
1 Answer
1
active
oldest
votes
You can set the following:
git config --global core.pager 'less -FRSX'
This will ensure that less will
- Exit if the entire file can be displayed on the first screen (F)
- Output the raw control characters for terminal formatting (R)
- Chop long lines (S)
- Don't send the init/de-init strings to the terminal - avoids clearing the screen on exit (X)
4
and omit the--global
if you want it to only apply to the current repository.
– mosvy
8 hours ago
Setting the environment variableLESS
to-FR
, adding in X and S to taste is another way.
– icarus
4 hours ago
See also unix.stackexchange.com/questions/469360/…
– icarus
4 hours ago
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f536727%2fwhy-is-less-being-run-unnecessarily-by-git%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can set the following:
git config --global core.pager 'less -FRSX'
This will ensure that less will
- Exit if the entire file can be displayed on the first screen (F)
- Output the raw control characters for terminal formatting (R)
- Chop long lines (S)
- Don't send the init/de-init strings to the terminal - avoids clearing the screen on exit (X)
4
and omit the--global
if you want it to only apply to the current repository.
– mosvy
8 hours ago
Setting the environment variableLESS
to-FR
, adding in X and S to taste is another way.
– icarus
4 hours ago
See also unix.stackexchange.com/questions/469360/…
– icarus
4 hours ago
add a comment |
You can set the following:
git config --global core.pager 'less -FRSX'
This will ensure that less will
- Exit if the entire file can be displayed on the first screen (F)
- Output the raw control characters for terminal formatting (R)
- Chop long lines (S)
- Don't send the init/de-init strings to the terminal - avoids clearing the screen on exit (X)
4
and omit the--global
if you want it to only apply to the current repository.
– mosvy
8 hours ago
Setting the environment variableLESS
to-FR
, adding in X and S to taste is another way.
– icarus
4 hours ago
See also unix.stackexchange.com/questions/469360/…
– icarus
4 hours ago
add a comment |
You can set the following:
git config --global core.pager 'less -FRSX'
This will ensure that less will
- Exit if the entire file can be displayed on the first screen (F)
- Output the raw control characters for terminal formatting (R)
- Chop long lines (S)
- Don't send the init/de-init strings to the terminal - avoids clearing the screen on exit (X)
You can set the following:
git config --global core.pager 'less -FRSX'
This will ensure that less will
- Exit if the entire file can be displayed on the first screen (F)
- Output the raw control characters for terminal formatting (R)
- Chop long lines (S)
- Don't send the init/de-init strings to the terminal - avoids clearing the screen on exit (X)
answered 8 hours ago
QISQIS
1717 bronze badges
1717 bronze badges
4
and omit the--global
if you want it to only apply to the current repository.
– mosvy
8 hours ago
Setting the environment variableLESS
to-FR
, adding in X and S to taste is another way.
– icarus
4 hours ago
See also unix.stackexchange.com/questions/469360/…
– icarus
4 hours ago
add a comment |
4
and omit the--global
if you want it to only apply to the current repository.
– mosvy
8 hours ago
Setting the environment variableLESS
to-FR
, adding in X and S to taste is another way.
– icarus
4 hours ago
See also unix.stackexchange.com/questions/469360/…
– icarus
4 hours ago
4
4
and omit the
--global
if you want it to only apply to the current repository.– mosvy
8 hours ago
and omit the
--global
if you want it to only apply to the current repository.– mosvy
8 hours ago
Setting the environment variable
LESS
to -FR
, adding in X and S to taste is another way.– icarus
4 hours ago
Setting the environment variable
LESS
to -FR
, adding in X and S to taste is another way.– icarus
4 hours ago
See also unix.stackexchange.com/questions/469360/…
– icarus
4 hours ago
See also unix.stackexchange.com/questions/469360/…
– icarus
4 hours ago
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f536727%2fwhy-is-less-being-run-unnecessarily-by-git%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
In general git doesn't know how much output there is going to be from any command, so it send everything by default through a pager, which will probably be less.
– icarus
4 hours ago