Compare commits
3 Commits
a524354983
...
5f18ac892e
| Author | SHA1 | Date |
|---|---|---|
|
|
5f18ac892e | |
|
|
2fc57d6306 | |
|
|
585696eeeb |
|
|
@ -1236,14 +1236,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
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ grow ways to set `$PREBUFFER` to inject free-form code into the generated file.
|
|||
Highlighting test
|
||||
-----------------
|
||||
|
||||
[`test-highlighting.zsh`](tests/test-highlighting.zsh) tests the correctness of
|
||||
[`test-highlighting.zsh`](test-highlighting.zsh) tests the correctness of
|
||||
the highlighting. Usage:
|
||||
|
||||
```zsh
|
||||
|
|
@ -110,7 +110,7 @@ results (tests that failed but were expected to succeed, or vice-versa), run
|
|||
Performance test
|
||||
----------------
|
||||
|
||||
[`test-perfs.zsh`](tests/test-perfs.zsh) measures the time spent doing the
|
||||
[`test-perfs.zsh`](test-perfs.zsh) measures the time spent doing the
|
||||
highlighting. Usage:
|
||||
|
||||
```zsh
|
||||
|
|
|
|||
Loading…
Reference in New Issue