From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21760 invoked from network); 31 May 2000 09:22:10 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 31 May 2000 09:22:10 -0000 Received: (qmail 1695 invoked by alias); 31 May 2000 09:21:45 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11686 Received: (qmail 1687 invoked from network); 31 May 2000 09:21:40 -0000 Date: Wed, 31 May 2000 11:21:35 +0200 (MET DST) Message-Id: <200005310921.LAA23144@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Sven Wischnowsky's message of Wed, 31 May 2000 08:51:02 +0200 (MET DST) Subject: PATCH: Re: #compdef tag and menu-select 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