From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2646 invoked from network); 21 Sep 2000 05:08:25 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 21 Sep 2000 05:08:25 -0000 Received: (qmail 26760 invoked by alias); 21 Sep 2000 05:07:52 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12852 Received: (qmail 26747 invoked from network); 21 Sep 2000 05:07:47 -0000 From: "Bart Schaefer" Message-Id: <1000921050730.ZM6446@candle.brasslantern.com> Date: Thu, 21 Sep 2000 05:07:29 +0000 In-Reply-To: <1000920175716.ZM31823@candle.brasslantern.com> Comments: In reply to "Bart Schaefer" "PATCH: _expand, _expand_word, and their doc" (Sep 20, 5:57pm) References: <1000920175716.ZM31823@candle.brasslantern.com> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.auc.dk Subject: Re: PATCH: _expand, _expand_word, and their doc MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Sep 20, 5:57pm, Bart Schaefer wrote: } } This has the undesirable side-effect of failing to call any of the usual } other completers such as _match (see zsh-users/3444 and its thread). So } I've deleted that line from _expand, and instead caused _expand_word to } fetch the `completer' style [...] Except I forgot that this is only supposed to happen when the completions style is set. Sorry about that. Index: Completion/Commands/_expand_word =================================================================== @@ -14,8 +14,12 @@ curcontext="expand-word:${curcontext#*:}" fi -zstyle -a ":completion:${curcontext}:" completer completers -completers[1,(i)_expand]=_expand -(( $#completers == 1 )) && completers=(_expand _complete) +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 Index: Doc/Zsh/compsys.yo =================================================================== @@ -2485,11 +2485,13 @@ item(tt(_expand_word (^Xe)))( Performs expansion on the current word: equivalent to the standard tt(expand-word) command, but using the tt(_expand) completer. Before -calling it, the var(function) field is set to `tt(expand-word)', and the -list of functions from the tt(completer) style in the resuting context is -shifted to remove all those to the left of tt(_expand). If tt(_expand) -does not appear in the style, then only the two completers tt(_expand) and -tt(_complete) are used (in that order). +calling it, the var(function) field is set to `tt(expand-word)'. + +The tt(completions) style is also tested in the resulting context. When +it is true, the list of functions from the tt(completer) style is shifted +to remove any that would be called ahead of tt(_expand). If tt(_expand) +does not appear in the tt(completer) style, then only the two completers +tt(_expand) and tt(_complete) are used (in that order). ) findex(_generic) item(tt(_generic))( -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net