File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -986,10 +986,12 @@ _zsh_highlight_main_highlighter_check_path()
986986 [[ -e $expanded_path ]] && return 0
987987
988988 # Search the path in CDPATH
989- local cdpath_dir
990- for cdpath_dir in $cdpath ; do
991- [[ -e " $cdpath_dir /$expanded_path " ]] && return 0
992- done
989+ if [[ $expanded_path != /* ]]; then
990+ local cdpath_dir
991+ for cdpath_dir in $cdpath ; do
992+ [[ -e " $cdpath_dir /$expanded_path " ]] && return 0
993+ done
994+ fi
993995
994996 # If dirname($1) doesn't exist, neither does $1.
995997 [[ ! -d ${expanded_path: h} ]] && return 1
Original file line number Diff line number Diff line change @@ -34,5 +34,5 @@ mkdir foo foo/bar
3434BUFFER=" /foo"
3535
3636expected_region_highlight=(
37- ' 1 4 unknown-token "fixed in the next commit" ' # x (/)
37+ ' 1 4 unknown-token' # x (/)
3838)
You can’t perform that action at this time.
0 commit comments