I want to be able to launch git diff with two different pagers on demand.
The only way I know is updating the git config and launching the command (or updating the GIT_PAGER variable).
Example of .gitconfig:
core.pager = cat
[Alias]
def-pager = config core.pager cat
diff1 = !git config core.pager less && git diff && git def-pager
That would let me launch git diff as default with cat pager and on demand launch git diff1 and use less pager.
My question is: Is there any other way to do this without changing git config everytime?
Something like:
git --pager=cat diff
git --pager=less diff