Hooks: Use pygmentize if available to visualize diff
This commit is contained in:
parent
164826a39b
commit
4d52761da6
@ -18,8 +18,12 @@ FILE_EXTS="py"
|
|||||||
|
|
||||||
# Use pygmentize instead of cat to parse diff with highlighting.
|
# Use pygmentize instead of cat to parse diff with highlighting.
|
||||||
# Install it with `pip install pygments` (Linux) or `easy_install Pygments` (Mac)
|
# Install it with `pip install pygments` (Linux) or `easy_install Pygments` (Mac)
|
||||||
# READER="pygmentize -l diff"
|
PYGMENTIZE=`which pygmentize`
|
||||||
READER=cat
|
if [ ! -z "$PYGMENTIZE" ]; then
|
||||||
|
READER="pygmentize -l diff"
|
||||||
|
else
|
||||||
|
READER=cat
|
||||||
|
fi
|
||||||
|
|
||||||
##################################################################
|
##################################################################
|
||||||
# There should be no need to change anything below this line.
|
# There should be no need to change anything below this line.
|
||||||
|
@ -31,8 +31,12 @@ FILE_EXTS=".c .h .cpp .hpp .cc .hh .cxx .m .mm .inc .java .glsl"
|
|||||||
|
|
||||||
# Use pygmentize instead of cat to parse diff with highlighting.
|
# Use pygmentize instead of cat to parse diff with highlighting.
|
||||||
# Install it with `pip install pygments` (Linux) or `easy_install Pygments` (Mac)
|
# Install it with `pip install pygments` (Linux) or `easy_install Pygments` (Mac)
|
||||||
# READER="pygmentize -l diff"
|
PYGMENTIZE=`which pygmentize`
|
||||||
READER=cat
|
if [ ! -z "$PYGMENTIZE" ]; then
|
||||||
|
READER="pygmentize -l diff"
|
||||||
|
else
|
||||||
|
READER=cat
|
||||||
|
fi
|
||||||
|
|
||||||
##################################################################
|
##################################################################
|
||||||
# There should be no need to change anything below this line.
|
# There should be no need to change anything below this line.
|
||||||
|
Loading…
Reference in New Issue
Block a user