How to setup difftool to use pager

275 views Asked by At

If I use a difftool that has simple shell output how to use pager that is set up in core.pager .gitconfig section?

1

There are 1 answers

0
chestozo On BEST ANSWER

git help config says:

pager.<cmd>
    If the value is boolean, turns on or off pagination of the output of a particular
    git subcommand when writing to a tty. Otherwise, turns on pagination for the
    subcommand using the pager specified by the value of pager.<cmd>. If --paginate or
    --no-pager is specified on the command line, it takes precedence over this option.
    To disable pagination for all commands, set core.pager or GIT_PAGER to cat.

So all you need is to add a [pager] section in .gitconfig and to place difftool = true there.