From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 855 invoked from network); 2 Nov 1998 13:56:52 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 2 Nov 1998 13:56:52 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id IAA15663; Mon, 2 Nov 1998 08:50:12 -0500 (EST) Resent-Date: Mon, 2 Nov 1998 08:50:12 -0500 (EST) Date: Mon, 2 Nov 1998 14:48:10 +0100 (MET) Message-Id: <199811021348.OAA22695@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@math.gatech.edu In-reply-to: "Zefram"'s message of Mon, 2 Nov 1998 12:31:43 +0000 (GMT) Subject: Re: completion behaviour (was: zsh-workers: zsh-3.1.5 released) Resent-Message-ID: <"TSyhc.0.dq3.JYRFs"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4502 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Zefram wrote: > ... > > >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".) > Let's clear this once and for all. Currently the testing code produces two types of information: the length of an ignored prefix and a possible range restriction in the command words. Without special support, the user would have to do the test and then manually notify the completion code of the restrictions to use (the prefix stuff for almost all completions and the range restriction for `-l' which is your example). In some cases this is trivial (e.g. for `S[-]'), in some cases it is not that easy (e.g. `n[-1,/]' or `r[-exec,;]'). Personally I don't care if we would have to manually notify the completion code, but I guess some users would like to have an easier way. On the other hand, we could put examples for the most obvious things in the manual. Maybe I'll write an updated version of my suggestion in the next days. Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de