utility module: fix/improve colordiff call in diff

The new call is compatible with colordiff v1.0.8 - v.1.0.15 (might be
compatible with even earlier versions, but not tested), while the
original one breaks down under v1.0.14 and v1.0.15. See
https://github.com/daveewart/colordiff/issues/22.
This commit is contained in:
Zhiming Wang 2015-07-09 17:53:58 -07:00 committed by Kaleb Elwert
parent 95d19b37c1
commit 464a8d20a1

View file

@ -8,7 +8,7 @@
function diff {
if zstyle -t ':prezto:module:utility:diff' color; then
if (( $+commands[colordiff] )); then
command diff --unified "$@" | colordiff --difftype diffu
command colordiff --unified "$@"
elif (( $+commands[git] )); then
git --no-pager diff --color=auto --no-ext-diff --no-index "$@"
else