This commit is contained in:
Zaidhaan 2026-02-10 21:33:38 +05:30 committed by GitHub
commit a185edc52a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 87 additions and 0 deletions

View file

@ -1216,6 +1216,12 @@ _zsh_highlight_main_highlighter_check_path()
integer autocd=0
fi
if [[ $zsyh_user_options[cdablevars] == on ]]; then
integer cdablevars=1
else
integer cdablevars=0
fi
if (( in_command_position )); then
# ### Currently, this value is never returned: either it's overwritten
# ### below, or the return code is non-zero
@ -1255,6 +1261,9 @@ _zsh_highlight_main_highlighter_check_path()
# ### This seems unreachable for the current callers
return 0
fi
elif (( autocd && cdablevars && $+nameddirs[(e)$expanded_path] )) && [[ -x $nameddirs[$expanded_path] ]]; then
REPLY=hashed-command
return 0
fi
else
if [[ -L $expanded_path || -e $expanded_path ]]; then