From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25055 invoked from network); 2 Nov 1998 12:40:07 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 2 Nov 1998 12:40:07 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id HAA14475; Mon, 2 Nov 1998 07:33:20 -0500 (EST) Resent-Date: Mon, 2 Nov 1998 07:33:20 -0500 (EST) Message-Id: <199811021231.MAA12204@diamond.tao.co.uk> Subject: Re: completion behaviour (was: zsh-workers: zsh-3.1.5 released) To: wischnow@informatik.hu-berlin.de (Sven Wischnowsky) Date: Mon, 2 Nov 1998 12:31:43 +0000 (GMT) From: "Zefram" Cc: zsh-workers@math.gatech.edu In-Reply-To: <199811021200.NAA22140@beta.informatik.hu-berlin.de> from "Sven Wischnowsky" at Nov 2, 98 01:00:28 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"UqbFX3.0.6Y3.GQQFs"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4501 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Sven Wischnowsky wrote: >So, if we are expecting to implement associative arrays with some >really powerful mechanisms (think about the pattern matching stuff >completion will/should support), *double take* Hmm, I didn't consider the pattern matching aspect when I suggested using associative arrays. But since the existing hashtable code provides an interface for pattern matching lookups, it shouldn't be difficult to provide a user interface. >Partly agreed (see above), but I would still like to give the user >some more support. Think of `r[-exec,;]'. The user would have to do the >matching and before (s)he can produce matches (s)he would have to tell >the completion code which command words should not be used. This can >get a bit nasty. What you need there is for the user-defined completion function, after recognising the "-exec", to recursively invoke the completion mechanism on the restricted range of words. As long as completion can be invoked recursively, there's no need for more specific support for this type of construct. (Consider also how to properly handle completion of the word after "sh -c".) -zefram