From dffbab0c9223818ff7f93dd6f1a3a550abcefda5 Mon Sep 17 00:00:00 2001 From: Evan Pitstick Date: Wed, 9 Oct 2013 12:02:34 -0400 Subject: [PATCH] a more simple and universal way (for zsh projects) to find highlight dir path --- zsh-syntax-highlighting.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zsh-syntax-highlighting.zsh b/zsh-syntax-highlighting.zsh index 967287b..cdbe4c4 100644 --- a/zsh-syntax-highlighting.zsh +++ b/zsh-syntax-highlighting.zsh @@ -198,7 +198,7 @@ _zsh_highlight_bind_widgets || { } # Resolve highlighters directory location. -_zsh_highlight_load_highlighters "${ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR:-$(dirname "$(readlink -f $0)")/highlighters}" || { +_zsh_highlight_load_highlighters "${ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR:-${${0:A}:h}/highlighters}" || { echo 'zsh-syntax-highlighting: failed loading highlighters, exiting.' >&2 return 1 }