oh-my-bash icon indicating copy to clipboard operation
oh-my-bash copied to clipboard

git branch -a shows branch in a `more` mode

Open endriu00 opened this issue 2 years ago • 6 comments

I would find more useful for myself to get the basic view for git branch -a and other git branch commands. I was searching for some aliases to comment, but I found none. How can I do?

endriu00 avatar Oct 26 '21 20:10 endriu00

Which theme do you use ?

locobastos avatar Oct 26 '21 20:10 locobastos

Hi! agnoster theme.

endriu00 avatar Oct 26 '21 21:10 endriu00

Hi! I also have the same issue.

alinasrullayev avatar Jul 16 '22 18:07 alinasrullayev

It doesn't reproduce in my environment. In my environment, git branch -a is opened in less as expected when the result doesn't fit in a terminal screen.

  • Q1 Is the problem specific to oh-my-bash? Or does it reproduce with oh-my-bash. You can temporarily turn off oh-my-bash by commenting out source "$OSH"/oh-my-bash.sh in ~/.bashrc and start a new session.
  • Q2 What is the result of the following commands?
$ git config --get core.pager
$ echo "$GIT_PAGER"
$ echo "$PAGER"

akinomyoga avatar Jul 16 '22 23:07 akinomyoga

Try this:

git config --global pager.branch false

That worked for me.

Source: https://stackoverflow.com/questions/48341920/git-branch-command-behaves-like-less

mialfe55 avatar Nov 14 '22 12:11 mialfe55

@mialfe55 Thanks for the comment! Ah, so does this mean the OP @endriu00 has actually asked about the way to completely turn off the viewer like more or less? I thought it in the opposite way as the OP would have asked for the basic viewer features like scrolling and searching which is available in less but missing in more.

@endriu00 Could you check the answer from @mialfe55 if that actually answers your question?

akinomyoga avatar Nov 14 '22 14:11 akinomyoga