From 28720c77aaf61601a30a767b9567156f3db8dca4 Mon Sep 17 00:00:00 2001 From: Julien Nicoulaud Date: Thu, 30 Jun 2011 20:08:43 +0200 Subject: [PATCH] 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` --- zsh-syntax-highlighting.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 zsh-syntax-highlighting.zsh diff --git a/zsh-syntax-highlighting.zsh b/zsh-syntax-highlighting.zsh old mode 100644 new mode 100755 index 5de1748..55200f3 --- a/zsh-syntax-highlighting.zsh +++ b/zsh-syntax-highlighting.zsh @@ -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