mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-12-04 21:56:45 +01:00
'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:
parent
626c034c68
commit
fed37a90ac
2 changed files with 36 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue