From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25000 invoked from network); 28 Feb 1999 03:11:52 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 28 Feb 1999 03:11:52 -0000 Received: (qmail 27384 invoked by alias); 28 Feb 1999 03:10:59 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5551 Received: (qmail 27374 invoked from network); 28 Feb 1999 03:10:56 -0000 From: "Bart Schaefer" Message-Id: <990227190920.ZM2220@candle.brasslantern.com> Date: Sat, 27 Feb 1999 19:09:20 -0800 In-Reply-To: <199902261220.NAA31482@beta.informatik.hu-berlin.de> Comments: In reply to Sven Wischnowsky "Re: completion parameter suggestion" (Feb 26, 1:20pm) References: <199902261220.NAA31482@beta.informatik.hu-berlin.de> X-Mailer: Z-Mail (4.0b.820 20aug96) To: Sven Wischnowsky , zsh-workers@sunsite.auc.dk Subject: Re: completion parameter suggestion MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Feb 26, 1:20pm, Sven Wischnowsky wrote: } Subject: Re: completion parameter suggestion } } Bart Schaefer wrote: } > Incidentally, I've never been clear on where the "matcher number" is } > coming from in the first place, nor what one would use it for. Maybe I } > just haven't looked through the examples closely enough. } } [...] global match specs (`compctl -M 'spec1' 'spec2'...), } these are tried by the completion code in order [...] } `MATCHER' is the number of the one which is currently tried. Hrm. I should think that the string rather than the number would be of much more use here. The `compctl -M` command may have been changed without changing the function, in which case the function's idea of what pattern goes with what number would be completely wrong. } > How about another associative array called `menustate' that holds all } > these things? } } As for the menu stuff, ok. But the list stuff isn't connected to } (only) menucompletion. Well ... displaying a list and allowing the user to choose from it is a "menu" even if it's not "menu completion" in the zsh sense. "Menu completion" is just a different way of displaying the list. So I won't have any problem with calling it `menustate' and putting list stuff in there, or calling it `list_state' and putting menucomplete stuff in there, or whatever, even if menucompletion isn't actually in use. } > The other possibility would be to automatically insert a dummy element 0 } > into `words' when ksharrays is set, and automatically remove it when } > ksharrays changes. That could be done without hooking into the option } > code if `words' was a special array with a special get-function. } } Hadn't thought about that, yes maybe... (but it's the other way round, } isn't it?) It is? ksharrays means array indices start at 0, right? So to get words[1] to be the command in ksharrays state, you have to insert a dummy element 0. (In non-ksharrays state, there's already a dummy element 0, which happens to be the same as element 1.) -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com