From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: Re: #compdef tag and menu-select
Date: Wed, 31 May 2000 11:21:35 +0200 (MET DST) [thread overview]
Message-ID: <200005310921.LAA23144@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Sven Wischnowsky's message of Wed, 31 May 2000 08:51:02 +0200 (MET DST)
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
reply other threads:[~2000-05-31 9:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200005310921.LAA23144@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).