Remove path_approx.

Fixes zsh-users/zsh-syntax-highlighting#187.
Adds a test for zsh-users/zsh-syntax-highlighting#204.
This commit is contained in:
Daniel Shahaf 2015-10-26 06:30:14 +00:00
parent 4d3da30f8b
commit 98aee7f8b9
3 changed files with 1 additions and 7 deletions

View File

@ -34,7 +34,6 @@ This highlighter defines the following styles:
* `hashed-command` - hashed commands
* `path` - paths
* `path_prefix` - path prefixes
* `path_approx` - approximated paths
* `globbing` - globbing expressions (`*.txt`)
* `history-expansion` - history expansion expressions (`!foo` and `^foo^bar`)
* `single-hyphen-option` - single hyphen options (-o)

View File

@ -42,7 +42,6 @@
: ${ZSH_HIGHLIGHT_STYLES[hashed-command]:=fg=green}
: ${ZSH_HIGHLIGHT_STYLES[path]:=underline}
: ${ZSH_HIGHLIGHT_STYLES[path_prefix]:=underline}
: ${ZSH_HIGHLIGHT_STYLES[path_approx]:=fg=yellow,underline}
: ${ZSH_HIGHLIGHT_STYLES[globbing]:=fg=blue}
: ${ZSH_HIGHLIGHT_STYLES[history-expansion]:=fg=blue}
: ${ZSH_HIGHLIGHT_STYLES[single-hyphen-option]:=none}
@ -285,9 +284,6 @@ _zsh_highlight_main_highlighter_check_path()
local -a tmp
tmp=( ${expanded_path}*(N) )
(( $#tmp > 0 )) && style_override=path_prefix && return 0
# or maybe an approximate path?
tmp=( (#a1)${expanded_path}*(N) )
(( $#tmp > 0 )) && style_override=path_approx && return 0
fi
# It's not a path.

View File

@ -27,7 +27,6 @@
# vim: ft=zsh sw=2 ts=2 et
# -------------------------------------------------------------------------------------------------
# without the trailing space, it's highlighted as path_approx (issue #187, issue #204)
BUFFER='echo; ;'
expected_region_highlight=(