Turning off the pager in git for the stash command only

前端 未结 4 1696
北海茫月
北海茫月 2021-01-07 17:19

I generally like the use of the pager in git, but for git stash the pager annoys me. When calling git stash list, I don\'t want to be shown the th

4条回答
  •  不要未来只要你来
    2021-01-07 18:10

    Alternatively you can configure less to exit if there's less than one screen's worth of output:

    export LESS='-F'
    

    Or, verbosely:

    export LESS='--quit-if-one-screen'
    

    If you have colours in your git output, you'll probably also want to pass the -r flag:

    export LESS='-F -r'
    

提交回复
热议问题