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`.
This commit is contained in:
		
							parent
							
								
									dbd27cb30a
								
							
						
					
					
						commit
						0fc6b07509
					
				|  | @ -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 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue