about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Core/compdump5
-rw-r--r--Completion/Core/compinit3
2 files changed, 8 insertions, 0 deletions
diff --git a/Completion/Core/compdump b/Completion/Core/compdump
index f427730f0..3f013c938 100644
--- a/Completion/Core/compdump
+++ b/Completion/Core/compdump
@@ -62,9 +62,14 @@ print >> $_d_file
 # argument to zle does not begin with a `_').
 
 _d_bks=()
+_d_complist=
 zle -lL |
   while read -rA _d_line; do
     if [[ ${_d_line[3]} = _* && ${_d_line[5]} = _* ]]; then
+      if [[ -z "$_d_complist" && ${_d_line[4]} = .menu-select ]]; then
+        print 'zmodload -i zsh/complist'
+	d_complist=yes
+      fi
       print -r - ${_d_line}
       _d_bks=($_d_bks ${_d_line[3]})
     fi
diff --git a/Completion/Core/compinit b/Completion/Core/compinit
index 5efc3d501..fc2bb4fc2 100644
--- a/Completion/Core/compinit
+++ b/Completion/Core/compinit
@@ -232,6 +232,7 @@ compdef() {
 	fi
 	[[ $1 = _* ]] || 1="_$1"
 	[[ $2 = .* ]] || 2=".$2"
+        [[ $2 = .menu-select ]] && zmodload -i zsh/complist
 	zle -C "$1" "$2" "$func"
 	if [[ -n $new ]]; then
 	  bindkey "$3" | read -A opt
@@ -250,8 +251,10 @@ compdef() {
 
       # Define the widget.
       if [[ $1 = .* ]]; then
+        [[ $1 = .menu-select ]] && zmodload -i zsh/complist
 	zle -C "$func" "$1" "$func"
       else
+        [[ $1 = menu-select ]] && zmodload -i zsh/complist
 	zle -C "$func" ".$1" "$func"
       fi
       shift