about summary refs log tree commit diff
path: root/Completion/Zsh
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Zsh')
-rw-r--r--Completion/Zsh/Command/_zstyle16
-rw-r--r--Completion/Zsh/Type/_completers14
2 files changed, 14 insertions, 16 deletions
diff --git a/Completion/Zsh/Command/_zstyle b/Completion/Zsh/Command/_zstyle
index 20ff47f87..dcebc6faf 100644
--- a/Completion/Zsh/Command/_zstyle
+++ b/Completion/Zsh/Command/_zstyle
@@ -4,22 +4,6 @@ local state context ostate line expl ctop suf
 local nm=$compstate[nmatches] taglist patterns pstyles contexts
 typeset -A opt_args styles
 
-(( $+functions[_completers] )) ||
-_completers() {
-  # option: -p - needs a `_' prefix
-  local us
-  local -a disp list expl
-
-  list=( complete approximate correct match expand list menu oldlist
-         ignored prefix history )
-  zparseopts -D -K -E 'p=us'
-  [[ -n "$us" ]] && us='_'
-  zstyle -t ":completion:${curcontext}:completers" prefix-hidden &&
-      disp=(-d list)
-  _wanted completers expl 'completer' \
-      compadd "$@" "$disp[@]" - "$us${^list[@]}"
-}
-
 _vcs_info_hooks() {
   compadd - ${functions[(I)+vi-*]#+vi-}
 }
diff --git a/Completion/Zsh/Type/_completers b/Completion/Zsh/Type/_completers
new file mode 100644
index 000000000..87c986a17
--- /dev/null
+++ b/Completion/Zsh/Type/_completers
@@ -0,0 +1,14 @@
+#autoload
+
+# option: -p - needs a `_' prefix
+local us
+local -a disp list expl
+
+list=( complete approximate correct match expand list menu oldlist
+       ignored prefix history )
+zparseopts -D -K -E 'p=us'
+[[ -n "$us" ]] && us='_'
+zstyle -t ":completion:${curcontext}:completers" prefix-hidden &&
+    disp=(-d list)
+_wanted completers expl 'completer' \
+    compadd "$@" "$disp[@]" - "$us${^list[@]}"