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:
parent
df2fe2a97d
commit
28720c77aa
2
zsh-syntax-highlighting.zsh
Normal file → Executable file
2
zsh-syntax-highlighting.zsh
Normal file → Executable file
@ -125,7 +125,7 @@ zmodload zsh/zleparameter 2>/dev/null || {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Resolve highlighters directory location.
|
# Resolve highlighters directory location.
|
||||||
highlighters_dir=`dirname $0`/highlighters
|
highlighters_dir="${ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR:-${0:h}/highlighters}"
|
||||||
[[ -d $highlighters_dir ]] || {
|
[[ -d $highlighters_dir ]] || {
|
||||||
echo "zsh-syntax-highlighting: highlighters directory '$highlighters_dir' not found, exiting." >&2
|
echo "zsh-syntax-highlighting: highlighters directory '$highlighters_dir' not found, exiting." >&2
|
||||||
return -1
|
return -1
|
||||||
|
Loading…
Reference in New Issue
Block a user