1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2025-07-01 18:39:26 +00:00

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

Nested `if` can be removed for simple cases like these.
Also, doc cleanup.
This commit is contained in:
Indrajit Raychaudhuri
2017-07-20 22:58:29 -05:00
committed by Kaleb Elwert
parent 96bbb31cc8
commit 2436806fce
2 changed files with 3 additions and 6 deletions

View File

@ -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