From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4394 invoked from network); 11 Aug 2000 07:55:07 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 11 Aug 2000 07:55:07 -0000 Received: (qmail 16608 invoked by alias); 11 Aug 2000 07:54:06 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12588 Received: (qmail 16592 invoked from network); 11 Aug 2000 07:54:05 -0000 Date: Fri, 11 Aug 2000 09:54:01 +0200 (MET DST) Message-Id: <200008110754.JAA09690@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Felix Rosencrantz's message of Thu, 10 Aug 2000 23:30:09 -0700 (PDT) Subject: Re: Completing parameter names that have yet to be set. Felix Rosencrantz wrote: > Since there is some talk about parameter completion... I've had a > custom version of _parameter for some time that I've been meaning to > document and submit. The customization was that it could complete > parameters that were not yet set. Using a style, the user specifies a > list of parameters that they want zsh to know about to complete. > > For example, with the zsh distribution there is the TESTNUM environment > variable, which can be used to specify a subset of the zsh tests when > running "make check" . However, most of the time this environment > variable is unset. I can't always remember the special variable. So > it's nice that zsh completion can. That's why I gave the `fake' style such a generic name. Although that probably wasn't so clever, because the value-formats may have to differ for different types of completions to fake. > I think it would be useful if the style specification allowed for descriptions > of these parameters. The descriptions could be used for parameters that > are already set. Though I'm not sure how to do this (with _values?). `fake' doesn't allow this yet (and the way it is used makes it hard (and probably a bit ugly, code-wise) to implement it there). But of course one can always do it with tag-labels and ignored-patterns. > ... > > It seems like the ability to tell zsh of words that can't be found by > querying the system (e.g. these parameter names, files that don't exist > yet, etc. ) would be useful. I was thinking that it would be useful > to add some generic code that would (maybe a completer). Maybe using > the new cache system. The code would allow the user to specify a set of > words to be tossed in with the words that standard completion functions > complete. I'm not sure what would be a good solution. This is more > meant to provoke some response/thought by the completion gurus. Given that the faked completions depend on the contexts, the type of completions and the user's preferences, I don't know how a function could help here. Maybe we'll just have to use `fake' (or several `fake-this-or-that' styles that replace `fake'), get some experience with it and then find out if and how we can improve it. And if it's needed. -- Sven Wischnowsky wischnow@informatik.hu-berlin.de