From e138cfd76526614b954f4c45c80e03b5c4a5e7be Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Fri, 2 Oct 2015 13:27:21 +0000 Subject: [PATCH] command word: Protect against the case that the command word starts with a minus. --- highlighters/main/main-highlighter.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/highlighters/main/main-highlighter.zsh b/highlighters/main/main-highlighter.zsh index 6fa2754..f7a9f12 100755 --- a/highlighters/main/main-highlighter.zsh +++ b/highlighters/main/main-highlighter.zsh @@ -159,7 +159,7 @@ _zsh_highlight_main_highlighter() else _zsh_highlight_main_highlighter_expand_path $arg local expanded_arg="$REPLY" - local res="$(LC_ALL=C builtin type -w ${expanded_arg} 2>/dev/null)" + local res="$(LC_ALL=C builtin type -w -- ${expanded_arg} 2>/dev/null)" case $res in *': reserved') style=$ZSH_HIGHLIGHT_STYLES[reserved-word];; *': suffix alias')