'main': Followup to 51614ca2c994: Run cheaper conditions first.

This was suggested on #355.
This commit is contained in:
Daniel Shahaf 2016-09-08 19:09:29 +00:00
parent 4c4baede51
commit fdaeec4514

View File

@ -119,7 +119,7 @@ _zsh_highlight_main__type() {
# falling through to the $() below, incurring a fork. (Issue #354.) # falling through to the $() below, incurring a fork. (Issue #354.)
# #
# The second disjunct mimics the isrelative() C call from the zsh bug. # The second disjunct mimics the isrelative() C call from the zsh bug.
elif { is-at-least 5.3 || [[ $1 != */* ]] } && elif { [[ $1 != */* ]] || is-at-least 5.3 } &&
! builtin type -w -- $1 >/dev/null 2>&1; then ! builtin type -w -- $1 >/dev/null 2>&1; then
REPLY=none REPLY=none
fi fi