How to get rid of ESC[ characters when using git diff on Mac OS X Mavericks?
This works:
git config --global core.pager "less -r"
Do you have a LESS
environment variable set? You can check using:
env | grep LESS
or:
echo $LESS
If so, you want to make sure the R
option is in there. That allows the ANSI escape sequences to pass through unscathed, and they'll be rendered as colors in the terminal.
Just for reference, I use this:
export LESS=eFRX