Prevent git from using pager for short output?

后端 未结 4 652
半阙折子戏
半阙折子戏 2021-01-03 22:11

When I was using Git Bash (Git For Windows) if a command (like git diff) had a short output (I\'m guessing smaller than the terminal\'s height) it would just pr

4条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-03 23:02

    This is not a Git thing, it's a property of your pager. Git doesn't know how long the output is going to be so it will always output using your pager.

    Configure your pager to quit if your output is less than one full screen. With less that's -F. You can set the LESS environment variable with your default switches.

提交回复
热议问题