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
|
if [[ $expanded_path[1] == / ]]; then
|
||||||
tmp_path=$expanded_path
|
tmp_path=$expanded_path
|
||||||
else
|
else
|
||||||
tmp_path=$PWD/$expanded_path
|
# Unlike $PWD, ${(%):-%/} predictably expands to '.' if the current
|
||||||
|
# working directory doesn't exist.
|
||||||
|
tmp_path=${(%):-%/}/$expanded_path
|
||||||
fi
|
fi
|
||||||
tmp_path=$tmp_path:a
|
tmp_path=$tmp_path:a
|
||||||
|
|
||||||
while [[ $tmp_path != / ]]; do
|
if [[ $tmp_path == /* ]]; then
|
||||||
[[ -n ${(M)ZSH_HIGHLIGHT_DIRS_BLACKLIST:#$tmp_path} ]] && return 1
|
while [[ $tmp_path != / ]]; do
|
||||||
tmp_path=$tmp_path:h
|
[[ -n ${(M)ZSH_HIGHLIGHT_DIRS_BLACKLIST:#$tmp_path} ]] && return 1
|
||||||
done
|
tmp_path=$tmp_path:h
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
if (( in_command_position )); then
|
if (( in_command_position )); then
|
||||||
if [[ -x $expanded_path ]]; 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
|
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:
|
the highlighting. Usage:
|
||||||
|
|
||||||
```zsh
|
```zsh
|
||||||
|
|
@ -110,7 +110,7 @@ results (tests that failed but were expected to succeed, or vice-versa), run
|
||||||
Performance test
|
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:
|
highlighting. Usage:
|
||||||
|
|
||||||
```zsh
|
```zsh
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue