mookid / diffr

Yet another diff highlighting tool
MIT License
575 stars 22 forks source link

Show example of how to configure git to use diffr by default? #67

Closed jedahan closed 4 years ago

jedahan commented 4 years ago

I was able to use GIT_PAGER=diffr but then its not actually paging. Would be cool to see some examples of how to do this.

waldyrious commented 4 years ago

@jedahan are you perhaps looking for this?

I prefer setting configs via the command line than by editing the gitconfig file, so here's how I did it in my experiments:

git config --global core.pager 'diffr | less -R'

or, to use something more elaborate:

git config --global core.pager 'diffr --colors refine-removed:foreground:black:nobold --colors refine-added:foreground:black:nobold | less -RXF'

I agree that having examples like these in the README would be helpful.

waldyrious commented 4 years ago

See also #41 and #62.

jedahan commented 4 years ago

I am blind; yes that works, thank you.