Some fixes consecutive to pull request #61 merge

* Allow to override highlighters directory through `ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR`
* Handle spaces in the directory path
* Use Zsh builtin "h" modifier instead of `dirname`
This commit is contained in:
Julien Nicoulaud 2011-06-30 20:08:43 +02:00
parent df2fe2a97d
commit 28720c77aa

2
zsh-syntax-highlighting.zsh Normal file → Executable file
View file

@ -125,7 +125,7 @@ zmodload zsh/zleparameter 2>/dev/null || {
}
# Resolve highlighters directory location.
highlighters_dir=`dirname $0`/highlighters
highlighters_dir="${ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR:-${0:h}/highlighters}"
[[ -d $highlighters_dir ]] || {
echo "zsh-syntax-highlighting: highlighters directory '$highlighters_dir' not found, exiting." >&2
return -1