From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10016 invoked from network); 2 May 2000 09:10:11 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 2 May 2000 09:10:11 -0000 Received: (qmail 20553 invoked by alias); 2 May 2000 09:09:49 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11053 Received: (qmail 20304 invoked from network); 2 May 2000 09:09:34 -0000 Date: Tue, 2 May 2000 11:09:08 +0200 (MET DST) Message-Id: <200005020909.LAA30591@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Bart Schaefer"'s message of Sun, 30 Apr 2000 09:50:14 +0000 Subject: Re: _complete_help vs. the matcher-list style Bart Schaefer wrote: > If you have a matcher-list style, using _complete_help causes any completion > function that uses that style to be called once for each match-spec in the > style. (I noticed this while working on a variant of _complete_debug.) > > I believe this is because _complete_help redefines compadd to always fail. Which we need to be sure that all completers are used, of course. > Nevertheless it's a bit of a pain, as no additional context information is > obtained by trying the other matchers. Hm, the easy way is to make the zstyle() function defined by _complete_help return the empty string when used for the matcher-list style. But that also reminds me that I've been dreaming about support to save/set/restore styles, for use by wrapper functions such as _complete_help. If anyone has any ideas or suggestions for something like that, I'd like to hear them. Bye Sven Index: Completion/Commands/_complete_help =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Commands/_complete_help,v retrieving revision 1.4 diff -u -r1.4 _complete_help --- Completion/Commands/_complete_help 2000/04/12 03:32:51 1.4 +++ Completion/Commands/_complete_help 2000/05/02 09:07:18 @@ -27,7 +27,14 @@ esac help_styles[${2}${_f}]="${help_styles[${2}${_f}]},${_t} ${3}:${_f}" fi - builtin zstyle "$@" + + # No need to call the completers more than once with different match specs. + + if [[ "$3" = matcher-list ]]; then + eval "${4}=( '' )" + else + builtin zstyle "$@" + fi } _main_complete -- Sven Wischnowsky wischnow@informatik.hu-berlin.de