Skip to content

Commit ec78b44

Browse files
committed
Remove path_approx.
Fixes zsh-users#187. Adds a test for zsh-users#204.
1 parent 57624bb commit ec78b44

File tree

3 files changed

+1
-7
lines changed

3 files changed

+1
-7
lines changed

highlighters/main/README.md

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ This highlighter defines the following styles:
3434
* `hashed-command` - hashed commands
3535
* `path` - paths
3636
* `path_prefix` - path prefixes
37-
* `path_approx` - approximated paths
3837
* `globbing` - globbing expressions (`*.txt`)
3938
* `history-expansion` - history expansion expressions (`!foo` and `^foo^bar`)
4039
* `single-hyphen-option` - single hyphen options (-o)

highlighters/main/main-highlighter.zsh

-4
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
: ${ZSH_HIGHLIGHT_STYLES[hashed-command]:=fg=green}
4343
: ${ZSH_HIGHLIGHT_STYLES[path]:=underline}
4444
: ${ZSH_HIGHLIGHT_STYLES[path_prefix]:=underline}
45-
: ${ZSH_HIGHLIGHT_STYLES[path_approx]:=fg=yellow,underline}
4645
: ${ZSH_HIGHLIGHT_STYLES[globbing]:=fg=blue}
4746
: ${ZSH_HIGHLIGHT_STYLES[history-expansion]:=fg=blue}
4847
: ${ZSH_HIGHLIGHT_STYLES[single-hyphen-option]:=none}
@@ -285,9 +284,6 @@ _zsh_highlight_main_highlighter_check_path()
285284
local -a tmp
286285
tmp=( ${expanded_path}*(N) )
287286
(( $#tmp > 0 )) && style_override=path_prefix && return 0
288-
# or maybe an approximate path?
289-
tmp=( (#a1)${expanded_path}*(N) )
290-
(( $#tmp > 0 )) && style_override=path_approx && return 0
291287
fi
292288

293289
# It's not a path.

highlighters/main/test-data/empty-command.zsh

+1-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727
# vim: ft=zsh sw=2 ts=2 et
2828
# -------------------------------------------------------------------------------------------------
2929

30-
# without the trailing space, it's highlighted as path_approx (issue #187, issue #204)
31-
BUFFER='echo; ; '
30+
BUFFER='echo; ;'
3231

3332
expected_region_highlight=(
3433
"5 5 $ZSH_HIGHLIGHT_STYLES[commandseparator]" # ;

0 commit comments

Comments
 (0)