From 0fc6b0750985b56e7410f0ea67fc27b3fea25cd7 Mon Sep 17 00:00:00 2001 From: Akinori MUSHA Date: Mon, 21 Oct 2013 21:18:38 +0900 Subject: [PATCH] Do not leak a variable: cdpath_dir. Leaking a variable that holds a path in CDPATH could easily end up appearing on your prompt like `~cdpath_dir/subdir`. --- highlighters/main/main-highlighter.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/highlighters/main/main-highlighter.zsh b/highlighters/main/main-highlighter.zsh index f70a286..21a40ea 100755 --- a/highlighters/main/main-highlighter.zsh +++ b/highlighters/main/main-highlighter.zsh @@ -164,6 +164,7 @@ _zsh_highlight_main_highlighter_check_path() [[ -z $expanded_path ]] && return 1 [[ -e $expanded_path ]] && return 0 # Search the path in CDPATH + local cdpath_dir for cdpath_dir in $cdpath ; do [[ -e "$cdpath_dir/$expanded_path" ]] && return 0 done