'main': _zsh_highlight_main__type: Add comments.
This commit is contained in:
parent
79596a84be
commit
abec25d013
@ -173,6 +173,10 @@ _zsh_highlight_main__type() {
|
|||||||
REPLY=builtin
|
REPLY=builtin
|
||||||
elif (( $+commands[(e)$1] )); then
|
elif (( $+commands[(e)$1] )); then
|
||||||
REPLY=command
|
REPLY=command
|
||||||
|
# None of the special hashes had a match, so fall back to 'type -w', for
|
||||||
|
# forward compatibility with future versions of zsh that may add new command
|
||||||
|
# types.
|
||||||
|
#
|
||||||
# zsh 5.2 and older have a bug whereby running 'type -w ./sudo' implicitly
|
# zsh 5.2 and older have a bug whereby running 'type -w ./sudo' implicitly
|
||||||
# runs 'hash ./sudo=/usr/local/bin/./sudo' (assuming /usr/local/bin/sudo
|
# runs 'hash ./sudo=/usr/local/bin/./sudo' (assuming /usr/local/bin/sudo
|
||||||
# exists and is in $PATH). Avoid triggering the bug, at the expense of
|
# exists and is in $PATH). Avoid triggering the bug, at the expense of
|
||||||
@ -187,6 +191,8 @@ _zsh_highlight_main__type() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if ! (( $+REPLY )); then
|
if ! (( $+REPLY )); then
|
||||||
|
# zsh/parameter not available or had no matches.
|
||||||
|
#
|
||||||
# Note that 'type -w' will run 'rehash' implicitly.
|
# Note that 'type -w' will run 'rehash' implicitly.
|
||||||
#
|
#
|
||||||
# We 'unalias' in a subshell, so the parent shell is not affected.
|
# We 'unalias' in a subshell, so the parent shell is not affected.
|
||||||
|
Loading…
Reference in New Issue
Block a user