50 lines
2.9 KiB
Bash
50 lines
2.9 KiB
Bash
# Speed up autocomplete, force prefix mapping
|
|
zstyle ':completion:*' accept-exact '*(N)'
|
|
zstyle ':completion:*' use-cache on
|
|
zstyle ':completion:*' cache-path $ZSH_CACHE_DIR
|
|
|
|
zstyle ':completion:*:processes' command 'ps -ax'
|
|
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;32'
|
|
zstyle ':completion:*:*:kill:*' menu yes select
|
|
zstyle ':completion:*:*:kill:*' force-list always
|
|
zstyle ':completion:*:*:kill:*' insert-ids single
|
|
|
|
zstyle ':completion:*:processes-names' command 'ps -e -o comm='
|
|
zstyle ':completion:*:*:killall:*' menu yes select
|
|
zstyle ':completion:*:killall:*' force-list always
|
|
|
|
# SSH/SCP/RSYNC
|
|
zstyle ':completion:*:(ssh|scp|rsync):*' hosts off
|
|
zstyle ':completion:*:(scp|rsync):*' tag-order 'hosts:-host hosts:-domain:domain hosts:-ipaddr:ip\ address *'
|
|
zstyle ':completion:*:(scp|rsync):*' group-order users files all-files hosts-domain hosts-host hosts-ipaddr
|
|
zstyle ':completion:*:ssh:*' tag-order users 'hosts:-host hosts:-domain:domain hosts:-ipaddr:ip\ address *'
|
|
zstyle ':completion:*:ssh:*' group-order hosts-domain hosts-host users hosts-ipaddr
|
|
zstyle ':completion:*:(ssh|scp|rsync):*:hosts-host' ignored-patterns '*.*' loopback localhost
|
|
zstyle ':completion:*:(ssh|scp|rsync):*:hosts-domain' ignored-patterns '<->.<->.<->.<->' '^*.*' '*@*'
|
|
zstyle ':completion:*:(ssh|scp|rsync):*:hosts-ipaddr' ignored-patterns '^<->.<->.<->.<->' '127.0.0.<->'
|
|
|
|
zcomet load zsh-users/zsh-completions
|
|
|
|
# Вызов в этом месте и в таком порядке
|
|
#if [ -z "${ZSH_MC_WORKAROUND}" ]; then
|
|
# zcomet load zsh-users/zsh-autosuggestions
|
|
#fi
|
|
#zcomet load zsh-users/zsh-syntax-highlighting
|
|
#zcomet load zsh-users/zsh-history-substring-search
|
|
|
|
# Отложенная загрузка
|
|
mkdir -p ${ZCOMET_DIR}/repos/zsh-users
|
|
if [[ ! -f "${ZCOMET_DIR}/repos/zsh-users/zsh-autosuggestions/zsh-autosuggestions.zsh" ]]; then
|
|
command git clone --depth=1 https://github.com/zsh-users/zsh-autosuggestions "${ZCOMET_DIR}/repos/zsh-users/zsh-autosuggestions"
|
|
fi
|
|
if [[ ! -f "${ZCOMET_DIR}/repos/zsh-users/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" ]]; then
|
|
command git clone --depth=1 https://github.com/zsh-users/zsh-syntax-highlighting "${ZCOMET_DIR}/repos/zsh-users/zsh-syntax-highlighting"
|
|
fi
|
|
if [[ ! -f "${ZCOMET_DIR}/repos/zsh-users/zsh-history-substring-search/zsh-history-substring-search.zsh" ]]; then
|
|
command git clone --depth=1 https://github.com/zsh-users/zsh-history-substring-search "${ZCOMET_DIR}/repos/zsh-users/zsh-history-substring-search"
|
|
fi
|
|
zsh-defer source "${ZCOMET_DIR}/repos/zsh-users/zsh-autosuggestions/zsh-autosuggestions.zsh" \
|
|
"${ZCOMET_DIR}/repos/zsh-users/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" \
|
|
"${ZCOMET_DIR}/repos/zsh-users/zsh-history-substring-search/zsh-history-substring-search.zsh"
|
|
|