mirror of
https://github.com/dcarrillo/prezto.git
synced 2026-04-19 09:54:06 +00:00
utility: conform 'diff' to GNU behaviour for scripting
This commit is contained in:
committed by
Indrajit Raychaudhuri
parent
43bf17169c
commit
371aaa254a
@@ -8,8 +8,10 @@
|
|||||||
# function diff {
|
# function diff {
|
||||||
|
|
||||||
if zstyle -t ':prezto:module:utility:diff' color \
|
if zstyle -t ':prezto:module:utility:diff' color \
|
||||||
|
&& [[ -t 1 ]] \
|
||||||
&& (( $+commands[colordiff] )); then
|
&& (( $+commands[colordiff] )); then
|
||||||
command diff "$@" | colordiff
|
command diff "$@" | colordiff
|
||||||
|
return "${pipestatus[1]}"
|
||||||
else
|
else
|
||||||
command diff "$@"
|
command diff "$@"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user