bat: `git log` broken when using bat as pager
I like using bat as my pager of choice with syntax highlighting! 😃. Somewhere across the internet I found the command export PAGER='bat --paging=always' to do exactly that.
Now I realized that my git log did not work anymore (did not show anything) and I found out that it was because of that setting. Setting export PAGER=less and my git log is back.
Is there a way how to make bat-pager and the git log compatible?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 30 (7 by maintainers)
That already fixed it. Thank you! 😃
Thanks for the awesome support guys. You were really persistent about solving this problem. 👍
There we have it. Ouch 😄
Based on the otool result, your build from source was after they removed the workaround. Since the command failed, I can’t tell what version your command line tools are though. I also don’t know which version of clang is considered fixed either, unfortunately.
There’s this stackoverflow thread that might help you figure out how to update your xcode command line tools. Once you figure that out, rebuilding bat again should work.
Or you could try reinstalling
batwithout-sto see if you get the correct.2revision bottle?Do you have more information about your environment and the version of bat you are using? What you did works fine for me… My system is:
I’m using version:
Trying this on my system (macOS Mojave) with
git -c core.pager='bat --paging=always --pager="less"' log(I can’t use PAGER because I have a globalcore.pagersetting), it works for me.Can you run the following script and paste the output?
Also, how big is your git log? Maybe you’re being affected by the less
--quit-if-one-screenbug?