zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: Re: #compdef tag and menu-select
@ 2000-05-31  9:21 Sven Wischnowsky
  0 siblings, 0 replies; only message in thread
From: Sven Wischnowsky @ 2000-05-31  9:21 UTC (permalink / raw)
  To: zsh-workers


I wrote:

> [ allow #compdef -k menu-select ... ]

Here is a more complete patch (no good trying that other patch it if
one has zmodload zsh/complist in .zshrc, sigh).

I'll commit this one.

Bye
 Sven

Index: Completion/Core/compdump
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Core/compdump,v
retrieving revision 1.4
diff -u -r1.4 compdump
--- Completion/Core/compdump	2000/05/25 14:48:38	1.4
+++ Completion/Core/compdump	2000/05/31 09:18:34
@@ -62,9 +62,14 @@
 # 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
Index: Completion/Core/compinit
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Core/compinit,v
retrieving revision 1.3
diff -u -r1.3 compinit
--- Completion/Core/compinit	2000/05/25 14:48:38	1.3
+++ Completion/Core/compinit	2000/05/31 09:18:34
@@ -232,6 +232,7 @@
 	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 @@
 
       # 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

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-05-31  9:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-31  9:21 PATCH: Re: #compdef tag and menu-select Sven Wischnowsky

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).