Daniel Shahaf 9 anos atrás
pai
commit
98aee7f8b9
3 arquivos alterados com 1 adições e 7 exclusões
  1. +0
    -1
      highlighters/main/README.md
  2. +0
    -4
      highlighters/main/main-highlighter.zsh
  3. +1
    -2
      highlighters/main/test-data/empty-command.zsh

+ 0
- 1
highlighters/main/README.md Ver arquivo

@ -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)

+ 0
- 4
highlighters/main/main-highlighter.zsh Ver arquivo

@ -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.

+ 1
- 2
highlighters/main/test-data/empty-command.zsh Ver arquivo

@ -27,8 +27,7 @@
# vim: ft=zsh sw=2 ts=2 et
# -------------------------------------------------------------------------------------------------
# without the trailing space, it's highlighted as path_approx (issue #187, issue #204)
BUFFER='echo; ; '
BUFFER='echo; ;'
expected_region_highlight=(
"5 5 $ZSH_HIGHLIGHT_STYLES[commandseparator]" # ;

Carregando…
Cancelar
Salvar