'main': Fix a bug concerning command word with embedded colon-space sequences.
Such a command word would, if not valid, fall through to the `type -w` case, where the output would be misparsed, consequently the forward-compatible [arg0] style would be used.
This commit is contained in:
@@ -147,7 +147,7 @@ _zsh_highlight_main__type() {
|
||||
fi
|
||||
fi
|
||||
if ! (( $+REPLY )); then
|
||||
REPLY="${$(LC_ALL=C builtin type -w -- $1 2>/dev/null)#*: }"
|
||||
REPLY="${$(LC_ALL=C builtin type -w -- $1 2>/dev/null)##*: }"
|
||||
fi
|
||||
if (( $+_zsh_highlight_main__command_type_cache )); then
|
||||
_zsh_highlight_main__command_type_cache[(e)$1]=$REPLY
|
||||
|
||||
Reference in New Issue
Block a user