Skip to content

Instantly share code, notes, and snippets.

@kaosf
Last active August 29, 2015 14:02
Show Gist options
  • Save kaosf/d361cd5169fb36297d9c to your computer and use it in GitHub Desktop.
Save kaosf/d361cd5169fb36297d9c to your computer and use it in GitHub Desktop.
if [ ! -f $HOME/local/bin/diff-highlight ]
then
wget https://raw.githubusercontent.com/git/git/34d9819e0a387be6d49cffe67458036450d6d0d5/contrib/diff-highlight/diff-highlight
wget https://gist.githubusercontent.com/a2ikm/2dbfb89114dfa5c543ed/raw/e2d8d550ef601c9310712f4187b803658427dd42/diff-highlight.utf8.patch
patch -u diff-highlight < diff-highlight.utf8.patch
chmod +x diff-highlight
rm diff-hilight.orig diff-hilight.utf8.patch
mkdir -p $HOME/local/bin
mv diff-highlight $HOME/local/bin
fi
git config --global pager.log 'diff-highlight | less'
git config --global pager.show 'diff-highlight | less'
git config --global pager.diff 'diff-highlight | less'
# ref.
# http://d.hatena.ne.jp/sugyan/20140207/1391771341
# http://motemen.hatenablog.com/entries/2013/11/26
# https://github.com/kaosf/dotfiles/commit/621799f08a29ddd23d7c5b72efebc6152ea16e50
# https://github.com/kaosf/dotfiles/commit/6175c98a9f3c5fadd2000fee400f23cda7eb9cff
# https://gist.github.com/a2ikm/2dbfb89114dfa5c543ed
@a2ikm
Copy link

a2ikm commented Jun 2, 2014

I encounterd "Wide character in print at" messages with your patch. So I fixed it and made a patch file: https://gist.github.com/a2ikm/2dbfb89114dfa5c543ed

@kaosf
Copy link
Author

kaosf commented Sep 13, 2014

Thank you for your comment! And sorry for my too late response.

@kaosf
Copy link
Author

kaosf commented Sep 13, 2014

Refered this gist from my dotfiles repository.

kaosf/dotfiles@6fba217

@kaosf
Copy link
Author

kaosf commented Jul 30, 2015

Updated today.

kaosf/dotfiles@2a170c2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment