[utility] Simplify enabling 'diff' color conditions in wrapper function

Nested `if` can be removed for simple cases like these.
Also, doc cleanup.
main
Indrajit Raychaudhuri 7 years ago committed by Kaleb Elwert
parent 96bbb31cc8
commit 2436806fce

@ -153,7 +153,7 @@ Functions
### Developer
- `diff` highlights diff output (requires `colordiff` or `Git`).
- `diff` highlights diff output (requires `colordiff`).
- `make` highlights make output (requires `colormake`).
- `wdiff` highlights wdiff output (requires `wdiff `or `Git`).

@ -6,12 +6,9 @@
#
function diff {
if zstyle -t ':prezto:module:utility:diff' color; then
if (( $+commands[colordiff] )); then
if zstyle -t ':prezto:module:utility:diff' color \
&& (( $+commands[colordiff] )); then
command colordiff "$@"
else
command diff "$@"
fi
else
command diff "$@"
fi

Loading…
Cancel
Save