Browse Source

Merge 585696eeeb into e0165eaa73

pull/751/merge
Roman Perepelitsa 7 months ago
committed by GitHub
parent
commit
14233b746a
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 5 deletions
  1. +9
    -5
      highlighters/main/main-highlighter.zsh

+ 9
- 5
highlighters/main/main-highlighter.zsh View File

@ -1234,14 +1234,18 @@ _zsh_highlight_main_highlighter_check_path()
if [[ $expanded_path[1] == / ]]; then
tmp_path=$expanded_path
else
tmp_path=$PWD/$expanded_path
# Unlike $PWD, ${(%):-%/} predictably expands to '.' if the current
# working directory doesn't exist.
tmp_path=${(%):-%/}/$expanded_path
fi
tmp_path=$tmp_path:a
while [[ $tmp_path != / ]]; do
[[ -n ${(M)ZSH_HIGHLIGHT_DIRS_BLACKLIST:#$tmp_path} ]] && return 1
tmp_path=$tmp_path:h
done
if [[ $tmp_path == /* ]]; then
while [[ $tmp_path != / ]]; do
[[ -n ${(M)ZSH_HIGHLIGHT_DIRS_BLACKLIST:#$tmp_path} ]] && return 1
tmp_path=$tmp_path:h
done
fi
if (( in_command_position )); then
if [[ -x $expanded_path ]]; then

Loading…
Cancel
Save