summary refs log tree commit diff
path: root/Completion/Commands/_expand_word
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Commands/_expand_word')
-rw-r--r--Completion/Commands/_expand_word11
1 files changed, 10 insertions, 1 deletions
diff --git a/Completion/Commands/_expand_word b/Completion/Commands/_expand_word
index fddd065ee..4ff24c3f5 100644
--- a/Completion/Commands/_expand_word
+++ b/Completion/Commands/_expand_word
@@ -6,6 +6,7 @@ setopt localoptions nullglob rcexpandparam extendedglob noshglob
 unsetopt markdirs globsubst shwordsplit nounset ksharrays
 
 local curcontext="$curcontext"
+local -ah completers
 
 if [[ -z "$curcontext" ]]; then
   curcontext="expand-word:::"
@@ -13,4 +14,12 @@ else
   curcontext="expand-word:${curcontext#*:}"
 fi
 
-_main_complete _expand
+if zstyle -t ":completion:${curcontext}:" completions; then
+    zstyle -a ":completion:${curcontext}:" completer completers
+    completers[1,(i)_expand]=_expand
+    (( $#completers == 1 )) && completers=(_expand _complete)
+else
+    completers=(_expand)
+fi
+
+_main_complete $completers