zsh: completion: ignore completer functions and expand wildcards

This commit is contained in:
Thomas Preisner 2017-07-15 23:11:38 +02:00
parent fa3e4a9a28
commit 65684fc3e3

View file

@ -57,6 +57,16 @@ zstyle ':completion:*:(^approximate):*' matcher-list 'm:{a-z}={A-Z}'
zstyle -e ':completion:*:approximate:*' max-errors \ zstyle -e ':completion:*:approximate:*' max-errors \
'reply=( $(( ($#PREFIX + $#SUFFIX) / 3 )) )' 'reply=( $(( ($#PREFIX + $#SUFFIX) / 3 )) )'
# expand shell wildcards to all matching files after <TAB>
zstyle ':completion:*:expand:*' tag-order all-expansions
# keep prefixed unexpanded if possible
zstyle ':completion:*:expand:*' keep-prefix on
# ignore completion functions (until the _ignored completer)
zstyle ':completion:*:functions' ignored-patterns '_*'
# do not propose anything starting with '_' when offering typo corrections
CORRECT_IGNORE='_*'
# ===== completion appearance # ===== completion appearance
# use ls colors for completion # use ls colors for completion
zstyle ':completion:*' list-colors "${(@s.:.)LS_COLORS}" zstyle ':completion:*' list-colors "${(@s.:.)LS_COLORS}"
@ -87,14 +97,9 @@ zstyle ':completion:*' menu select=1 _complete _ignored _approximate
# Add simple colors to kill # Add simple colors to kill
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01' zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
# insert all expansions for expand completer
# zstyle ':completion:*:expand:*' tag-order all-expansions
# offer indexes before parameters in subscripts # offer indexes before parameters in subscripts
zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters
# ignore completion functions (until the _ignored completer)
zstyle ':completion:*:functions' ignored-patterns '_*'
zstyle '*' single-ignored show zstyle '*' single-ignored show
# apt-get recommendations # apt-get recommendations