mirror of
https://github.com/dcarrillo/prezto.git
synced 2024-11-15 21:01:12 +00:00
464a8d20a1
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.
23 lines
454 B
Plaintext
23 lines
454 B
Plaintext
#
|
|
# Highlights diff output.
|
|
#
|
|
# Authors:
|
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
|
#
|
|
|
|
function diff {
|
|
if zstyle -t ':prezto:module:utility:diff' color; then
|
|
if (( $+commands[colordiff] )); then
|
|
command colordiff --unified "$@"
|
|
elif (( $+commands[git] )); then
|
|
git --no-pager diff --color=auto --no-ext-diff --no-index "$@"
|
|
else
|
|
command diff --unified "$@"
|
|
fi
|
|
else
|
|
command diff --unified "$@"
|
|
fi
|
|
}
|
|
|
|
diff "$@"
|