From f26310d97e41d165b6ba3ce85940ccfeb5c8b35b Mon Sep 17 00:00:00 2001 From: Guido Date: Thu, 16 Jun 2011 04:28:59 -0700 Subject: [PATCH] * enable command lines starting with a hyphen. --- highlighters/main/main-highlighter.zsh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/highlighters/main/main-highlighter.zsh b/highlighters/main/main-highlighter.zsh index 3996f87..d490046 100644 --- a/highlighters/main/main-highlighter.zsh +++ b/highlighters/main/main-highlighter.zsh @@ -138,7 +138,9 @@ _zsh_highlight_main_highlighter_check_path() [[ -z ${(Q)arg} ]] && return 1 [[ -e ${(Q)arg} ]] && return 0 [[ ! -e ${(Q)arg:h} ]] && return 1 - [[ ${#BUFFER} == $end_pos && -n $(print ${(Q)arg}*(N)) ]] && return 0 + if [[ ${BUFFER[1]} != "-" ]]; then + [[ ${#BUFFER} == $end_pos && -n $(print ${(Q)arg}*(N)) ]] && return 0 + fi return 1 }