driver: Fix duplicated slash in error message

Fixes #400.
This commit is contained in:
vinter 2016-12-15 21:41:35 +09:00 committed by Daniel Shahaf
parent 4f49c4a35f
commit aac4a44238

View File

@ -340,8 +340,8 @@ _zsh_highlight_load_highlighters()
local highlighter highlighter_dir
for highlighter_dir ($1/*/); do
highlighter="${highlighter_dir:t}"
[[ -f "$highlighter_dir/${highlighter}-highlighter.zsh" ]] &&
. "$highlighter_dir/${highlighter}-highlighter.zsh"
[[ -f "$highlighter_dir${highlighter}-highlighter.zsh" ]] &&
. "$highlighter_dir${highlighter}-highlighter.zsh"
if type "_zsh_highlight_highlighter_${highlighter}_paint" &> /dev/null &&
type "_zsh_highlight_highlighter_${highlighter}_predicate" &> /dev/null;
then
@ -358,7 +358,7 @@ _zsh_highlight_load_highlighters()
eval "_zsh_highlight_highlighter_${(q)highlighter}_paint() { _zsh_highlight_${(q)highlighter}_highlighter \"\$@\" }"
eval "_zsh_highlight_highlighter_${(q)highlighter}_predicate() { _zsh_highlight_${(q)highlighter}_highlighter_predicate \"\$@\" }"
else
print -r -- >&2 "zsh-syntax-highlighting: ${(qq)highlighter} highlighter should define both required functions '_zsh_highlight_highlighter_${highlighter}_paint' and '_zsh_highlight_highlighter_${highlighter}_predicate' in ${(qq):-"$highlighter_dir/${highlighter}-highlighter.zsh"}."
print -r -- >&2 "zsh-syntax-highlighting: ${(qq)highlighter} highlighter should define both required functions '_zsh_highlight_highlighter_${highlighter}_paint' and '_zsh_highlight_highlighter_${highlighter}_predicate' in ${(qq):-"$highlighter_dir${highlighter}-highlighter.zsh"}."
fi
done
}