Skip to content

Commit

Permalink
Merge pull request ohmyzsh#122 from shockone/master
Browse files Browse the repository at this point in the history
Update main-highlighter.zsh
  • Loading branch information
nicoulaj committed Aug 8, 2013
2 parents e5d8a50 + 57c01d1 commit 6fcdb06
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions highlighters/main/main-highlighter.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ _zsh_highlight_main_highlighter_check_path()
local expanded_path; : ${expanded_path:=${(Q)~arg}}
[[ -z $expanded_path ]] && return 1
[[ -e $expanded_path ]] && return 0
# Search the path in CDPATH
for cdpath_dir in $cdpath ; do
[[ -e "$cdpath_dir/$expanded_path" ]] && return 0
done
[[ ! -e ${expanded_path:h} ]] && return 1
[[ ${BUFFER[1]} != "-" && ${#BUFFER} == $end_pos && -n $(print ${expanded_path}*(N)) ]] && return 0
return 1
Expand Down

0 comments on commit 6fcdb06

Please sign in to comment.