28 lines
1020 B
Bash
28 lines
1020 B
Bash
# Load completions
|
|
autoload -Uz compinit && compinit -d $ZSH_CACHE_DIR/zcompdump
|
|
|
|
# Smart completion
|
|
setopt AUTO_MENU
|
|
setopt COMPLETE_IN_WORD
|
|
setopt ALWAYS_TO_END
|
|
setopt PATH_DIRS
|
|
setopt AUTO_PARAM_SLASH
|
|
|
|
# Completion styling
|
|
zstyle ':completion:*' menu select
|
|
zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|=*' 'l:|=* r:|=*'
|
|
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
|
|
zstyle ':completion:*' use-cache yes
|
|
zstyle ':completion:*' cache-path $ZSH_CACHE_DIR
|
|
zstyle ':completion:*' special-dirs true
|
|
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
|
|
|
|
# Better directory navigation
|
|
zstyle ':completion:*' expand-or-complete-prefix-with-dots
|
|
zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories
|
|
|
|
# FZF-tab specific settings
|
|
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls -1 --color=always $realpath'
|
|
zstyle ':fzf-tab:complete:*:*' fzf-preview 'less ${(Q)realpath}'
|
|
zstyle ':fzf-tab:*' switch-group ',' '.'
|