mirror of
https://github.com/dcarrillo/prezto.git
synced 2025-01-02 23:46:47 +00:00
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:
parent
95d19b37c1
commit
464a8d20a1
@ -8,7 +8,7 @@
|
|||||||
function diff {
|
function diff {
|
||||||
if zstyle -t ':prezto:module:utility:diff' color; then
|
if zstyle -t ':prezto:module:utility:diff' color; then
|
||||||
if (( $+commands[colordiff] )); then
|
if (( $+commands[colordiff] )); then
|
||||||
command diff --unified "$@" | colordiff --difftype diffu
|
command colordiff --unified "$@"
|
||||||
elif (( $+commands[git] )); then
|
elif (( $+commands[git] )); then
|
||||||
git --no-pager diff --color=auto --no-ext-diff --no-index "$@"
|
git --no-pager diff --color=auto --no-ext-diff --no-index "$@"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user