parent
4f49c4a35f
commit
aac4a44238
@ -340,8 +340,8 @@ _zsh_highlight_load_highlighters()
|
|||||||
local highlighter highlighter_dir
|
local highlighter highlighter_dir
|
||||||
for highlighter_dir ($1/*/); do
|
for highlighter_dir ($1/*/); do
|
||||||
highlighter="${highlighter_dir:t}"
|
highlighter="${highlighter_dir:t}"
|
||||||
[[ -f "$highlighter_dir/${highlighter}-highlighter.zsh" ]] &&
|
[[ -f "$highlighter_dir${highlighter}-highlighter.zsh" ]] &&
|
||||||
. "$highlighter_dir/${highlighter}-highlighter.zsh"
|
. "$highlighter_dir${highlighter}-highlighter.zsh"
|
||||||
if type "_zsh_highlight_highlighter_${highlighter}_paint" &> /dev/null &&
|
if type "_zsh_highlight_highlighter_${highlighter}_paint" &> /dev/null &&
|
||||||
type "_zsh_highlight_highlighter_${highlighter}_predicate" &> /dev/null;
|
type "_zsh_highlight_highlighter_${highlighter}_predicate" &> /dev/null;
|
||||||
then
|
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}_paint() { _zsh_highlight_${(q)highlighter}_highlighter \"\$@\" }"
|
||||||
eval "_zsh_highlight_highlighter_${(q)highlighter}_predicate() { _zsh_highlight_${(q)highlighter}_highlighter_predicate \"\$@\" }"
|
eval "_zsh_highlight_highlighter_${(q)highlighter}_predicate() { _zsh_highlight_${(q)highlighter}_highlighter_predicate \"\$@\" }"
|
||||||
else
|
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
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user