소스 검색

main: Mark ZSH_HIGHLIGHT_DIRS_BLACKLIST experimental

pull/496/head
Matthew Martin 6 년 전
부모
커밋
15e288a25c
3개의 변경된 파일6개의 추가작업 그리고 5개의 파일을 삭제
  1. +3
    -2
      docs/highlighters/main.md
  2. +2
    -2
      highlighters/main/main-highlighter.zsh
  3. +1
    -1
      highlighters/main/test-data/dirs_blacklist.zsh

+ 3
- 2
docs/highlighters/main.md 파일 보기

@ -73,9 +73,10 @@ manual page][zshzle-Character-Highlighting].
#### Parameters
To avoid partial path lookups on a path, add the path to the `ZSH_HIGHLIGHT_DIRS_BLACKLIST` array.
To avoid partial path lookups on a path, add the path to the `X_ZSH_HIGHLIGHT_DIRS_BLACKLIST` array.
This interface is still experimental.
ZSH_HIGHLIGHT_DIRS_BLACKLIST+=(/mnt/slow_share)
X_ZSH_HIGHLIGHT_DIRS_BLACKLIST+=(/mnt/slow_share)
### Useless trivia

+ 2
- 2
highlighters/main/main-highlighter.zsh 파일 보기

@ -774,7 +774,7 @@ _zsh_highlight_main_highlighter_check_path()
tmp_path=$tmp_path:a
while [[ $tmp_path != / ]]; do
[[ -n "${(M)ZSH_HIGHLIGHT_DIRS_BLACKLIST:#$tmp_path}" ]] && return 1
[[ -n "${(M)X_ZSH_HIGHLIGHT_DIRS_BLACKLIST:#$tmp_path}" ]] && return 1
tmp_path=$tmp_path:h
done
@ -1083,4 +1083,4 @@ else
# Make sure the cache is unset
unset _zsh_highlight_main__command_type_cache
fi
typeset -ga ZSH_HIGHLIGHT_DIRS_BLACKLIST
typeset -ga X_ZSH_HIGHLIGHT_DIRS_BLACKLIST

+ 1
- 1
highlighters/main/test-data/dirs_blacklist.zsh 파일 보기

@ -30,7 +30,7 @@
mkdir foo
touch foo/bar
BUFFER=": foo/bar $PWD/foo foo/b"
ZSH_HIGHLIGHT_DIRS_BLACKLIST=($PWD/foo)
X_ZSH_HIGHLIGHT_DIRS_BLACKLIST=($PWD/foo)
expected_region_highlight=(
'1 1 builtin' # :

불러오는 중...
취소
저장