main: Drop X_ from X_ZSH_HIGHLIGHT_DIRS_BLACKLIST
This commit is contained in:
parent
8e78e9dbba
commit
b55832c5f8
@ -85,11 +85,11 @@ manual page][zshzle-Character-Highlighting].
|
|||||||
|
|
||||||
#### Parameters
|
#### Parameters
|
||||||
|
|
||||||
To avoid partial path lookups on a path, add the path to the `X_ZSH_HIGHLIGHT_DIRS_BLACKLIST` array.
|
To avoid partial path lookups on a path, add the path to the `ZSH_HIGHLIGHT_DIRS_BLACKLIST` array.
|
||||||
This interface is still experimental.
|
This interface is still experimental.
|
||||||
|
|
||||||
```zsh
|
```zsh
|
||||||
X_ZSH_HIGHLIGHT_DIRS_BLACKLIST+=(/mnt/slow_share)
|
ZSH_HIGHLIGHT_DIRS_BLACKLIST+=(/mnt/slow_share)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Useless trivia
|
### Useless trivia
|
||||||
|
@ -355,6 +355,12 @@ _zsh_highlight_highlighter_main_paint()
|
|||||||
'!' # reserved word; unrelated to $histchars[1]
|
'!' # reserved word; unrelated to $histchars[1]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (( $+X_ZSH_HIGHLIGHT_DIRS_BLACKLIST )); then
|
||||||
|
print >&2 'zsh-syntax-highlighting: X_ZSH_HIGHLIGHT_DIRS_BLACKLIST is deprecated. Please use ZSH_HIGHLIGHT_DIRS_BLACKLIST.'
|
||||||
|
ZSH_HIGHLIGHT_DIRS_BLACKLIST=($X_ZSH_HIGHLIGHT_DIRS_BLACKLIST)
|
||||||
|
unset X_ZSH_HIGHLIGHT_DIRS_BLACKLIST
|
||||||
|
fi
|
||||||
|
|
||||||
_zsh_highlight_main_highlighter_highlight_list -$#PREBUFFER '' 1 "$PREBUFFER$BUFFER"
|
_zsh_highlight_main_highlighter_highlight_list -$#PREBUFFER '' 1 "$PREBUFFER$BUFFER"
|
||||||
|
|
||||||
# end is a reserved word
|
# end is a reserved word
|
||||||
@ -966,7 +972,7 @@ _zsh_highlight_main_highlighter_check_path()
|
|||||||
tmp_path=$tmp_path:a
|
tmp_path=$tmp_path:a
|
||||||
|
|
||||||
while [[ $tmp_path != / ]]; do
|
while [[ $tmp_path != / ]]; do
|
||||||
[[ -n ${(M)X_ZSH_HIGHLIGHT_DIRS_BLACKLIST:#$tmp_path} ]] && return 1
|
[[ -n ${(M)ZSH_HIGHLIGHT_DIRS_BLACKLIST:#$tmp_path} ]] && return 1
|
||||||
tmp_path=$tmp_path:h
|
tmp_path=$tmp_path:h
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -1411,4 +1417,4 @@ else
|
|||||||
# Make sure the cache is unset
|
# Make sure the cache is unset
|
||||||
unset _zsh_highlight_main__command_type_cache
|
unset _zsh_highlight_main__command_type_cache
|
||||||
fi
|
fi
|
||||||
typeset -ga X_ZSH_HIGHLIGHT_DIRS_BLACKLIST
|
typeset -ga ZSH_HIGHLIGHT_DIRS_BLACKLIST
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
mkdir foo
|
mkdir foo
|
||||||
touch foo/bar
|
touch foo/bar
|
||||||
BUFFER=": foo/bar $PWD/foo foo/b"
|
BUFFER=": foo/bar $PWD/foo foo/b"
|
||||||
X_ZSH_HIGHLIGHT_DIRS_BLACKLIST=($PWD/foo $PWD/bar)
|
ZSH_HIGHLIGHT_DIRS_BLACKLIST=($PWD/foo $PWD/bar)
|
||||||
|
|
||||||
expected_region_highlight=(
|
expected_region_highlight=(
|
||||||
'1 1 builtin' # :
|
'1 1 builtin' # :
|
||||||
|
@ -432,6 +432,12 @@ zmodload zsh/parameter 2>/dev/null || true
|
|||||||
# Initialize the array of active highlighters if needed.
|
# Initialize the array of active highlighters if needed.
|
||||||
[[ $#ZSH_HIGHLIGHT_HIGHLIGHTERS -eq 0 ]] && ZSH_HIGHLIGHT_HIGHLIGHTERS=(main)
|
[[ $#ZSH_HIGHLIGHT_HIGHLIGHTERS -eq 0 ]] && ZSH_HIGHLIGHT_HIGHLIGHTERS=(main)
|
||||||
|
|
||||||
|
if (( $+X_ZSH_HIGHLIGHT_DIRS_BLACKLIST )); then
|
||||||
|
print >&2 'zsh-syntax-highlighting: X_ZSH_HIGHLIGHT_DIRS_BLACKLIST is deprecated. Please use ZSH_HIGHLIGHT_DIRS_BLACKLIST.'
|
||||||
|
ZSH_HIGHLIGHT_DIRS_BLACKLIST=($X_ZSH_HIGHLIGHT_DIRS_BLACKLIST)
|
||||||
|
unset X_ZSH_HIGHLIGHT_DIRS_BLACKLIST
|
||||||
|
fi
|
||||||
|
|
||||||
# Restore the aliases we unned
|
# Restore the aliases we unned
|
||||||
eval "$zsh_highlight__aliases"
|
eval "$zsh_highlight__aliases"
|
||||||
builtin unset zsh_highlight__aliases
|
builtin unset zsh_highlight__aliases
|
||||||
|
Loading…
Reference in New Issue
Block a user