zsh: fix completion duplication, remove dead code and duplicates
This commit is contained in:
@@ -39,7 +39,6 @@ zstyle ':completion:*' matcher-list \
|
||||
|
||||
# ═══ Цвета ═════════════════════════════════════════════════
|
||||
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
|
||||
zstyle ':completion:*' list-colors ''
|
||||
|
||||
# ═══ Процессы ══════════════════════════════════════════════
|
||||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
|
||||
@@ -60,17 +59,11 @@ zstyle ':completion:*' list-dirs-first true
|
||||
zstyle ':completion:*:cd:*' ignore-parents parent pwd
|
||||
|
||||
# ═══ Хосты ═════════════════════════════════════════════════
|
||||
zstyle ':completion:*:ssh:*' hosts off
|
||||
zstyle ':completion:*:scp:*' hosts off
|
||||
|
||||
# Читать хосты из ~/.ssh/config
|
||||
if [[ -f ~/.ssh/config ]]; then
|
||||
h=()
|
||||
if [[ -r ~/.ssh/config ]]; then
|
||||
h=(${${${(@M)${(f)"$(cat ~/.ssh/config)"}:#Host *}#Host }:#*[*?]*})
|
||||
fi
|
||||
zstyle ':completion:*:ssh:*' hosts $h
|
||||
zstyle ':completion:*:scp:*' hosts $h
|
||||
if [[ -r ~/.ssh/config ]]; then
|
||||
local _ssh_hosts=(${${${(@M)${(f)"$(cat ~/.ssh/config)"}:#Host *}#Host }:#*[*?]*})
|
||||
zstyle ':completion:*:ssh:*' hosts $_ssh_hosts
|
||||
zstyle ':completion:*:scp:*' hosts $_ssh_hosts
|
||||
fi
|
||||
|
||||
# ═══ Man страницы ══════════════════════════════════════════
|
||||
@@ -91,4 +84,3 @@ zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters
|
||||
|
||||
# ═══ Расширения ════════════════════════════════════════════
|
||||
zstyle ':completion:*' squeeze-slashes true
|
||||
zstyle ':completion:*' expand yes
|
||||
|
||||
Reference in New Issue
Block a user