1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2024-12-23 03:27:59 +00:00
prezto/modules/utility/functions/diff
Indrajit Raychaudhuri 2436806fce [utility] Simplify enabling 'diff' color conditions in wrapper function
Nested `if` can be removed for simple cases like these.
Also, doc cleanup.
2017-11-12 16:51:24 -08:00

18 lines
274 B
Plaintext

#
# Highlights diff output.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
function diff {
if zstyle -t ':prezto:module:utility:diff' color \
&& (( $+commands[colordiff] )); then
command colordiff "$@"
else
command diff "$@"
fi
}
diff "$@"