summaryrefslogtreecommitdiff
path: root/.zsh/zshrc/20_compsys
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2020-03-26 20:18:43 +0100
committerTobias Klauser <tklauser@distanz.ch>2020-03-26 20:18:43 +0100
commit40e9e3d1a7291b7948774ed1f46d9cb8db4e3f5d (patch)
tree63d3530bb037196ec5908e6e2a71e362a63ece1c /.zsh/zshrc/20_compsys
parentb2b414a5630dd8e82a474a739e7c17ab380cc644 (diff)
completion, zshrc: add kubectl completion
Diffstat (limited to '.zsh/zshrc/20_compsys')
-rw-r--r--.zsh/zshrc/20_compsys28
1 files changed, 18 insertions, 10 deletions
diff --git a/.zsh/zshrc/20_compsys b/.zsh/zshrc/20_compsys
index 3da9ea8..102c31b 100644
--- a/.zsh/zshrc/20_compsys
+++ b/.zsh/zshrc/20_compsys
@@ -9,10 +9,22 @@
# Released under the terms of the Artistic Licence 2.0
#
# Source repository: git://git.distanz.ch/dotfiles/zsh.git
-#
zstyle :compinstall filename '$ZDOTDIR/zshrc/20_compsys'
+### INIT
+
+autoload -Uz compinit
+compinit -d $ZVARDIR/comp-$HOST
+
+# load fancy completion list and menu handler
+zmodload zsh/complist
+
+# avoid old-style completion (compctl)
+zstyle ':completion:*' use-compctl false
+
+### OPTIONS
+
# do not complete just at the end
setopt completeinword
@@ -37,13 +49,6 @@ setopt correct
# be magic about adding/removing final characters on tab completion
setopt auto_param_keys auto_param_slash auto_remove_slash
-# load fancy completion list and menu handler
-zmodload zsh/complist
-
-# initialise the completion system
-autoload -U compinit
-compinit -d $ZVARDIR/comp-$HOST
-
# cache results
zstyle ':completion:*' use-cache on
zstyle ':completion:*' cache-path $ZVARDIR/compcache
@@ -65,7 +70,7 @@ zstyle ':completion:*:history-words' remove-all-dups yes
zstyle ':completion:*:history-words' stop yes
# match uppercase from lowercase
-zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
+zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|=*' 'l:|=* r:|=*'
# ignore working and backup copies, and compiled objects
#zstyle ':completion:*:(all-|)files' ignored-patterns \
@@ -134,6 +139,9 @@ zstyle ':completion:*:manuals.*' insert-sections true
zstyle ':completion:*:man:*' menu yes select
# provide .. as a completion
-zstyle ':completion:*' special-dirs ..
+zstyle ':completion:*' special-dirs true
+
+# automatically load bash completion functions
+autoload -Uz bashcompinit && bashcompinit
# vim:ft=zsh