From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29562 invoked from network); 22 Feb 2000 09:00:56 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 22 Feb 2000 09:00:56 -0000 Received: (qmail 7620 invoked by alias); 22 Feb 2000 09:00:36 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9830 Received: (qmail 7611 invoked from network); 22 Feb 2000 09:00:35 -0000 Date: Tue, 22 Feb 2000 10:00:32 +0100 (MET) Message-Id: <200002220900.KAA14468@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Oliver Kiddle's message of Mon, 21 Feb 2000 18:54:18 +0000 Subject: Re: PATCH: _x_arguments too broad Oliver Kiddle wrote: > Clint Adams wrote: > > > > zsh 433 % /usr/bin/X11/imake -display > > -display -geometry > > > > Not very useful. OTOH, /usr/openwin/bin/imake will > > complete files, which is perhaps more desirable in > > It may not be useful but it does offer files aswell so isn't doing any > great harm, especially for people like me who have their styles > configured to only complete options after an initial prefix. Note also that this (prefix-needed=yes) is the default value for the style, so it will hurt only people who explictily turn it off. > > this instance. Since not every binary in */X11/* > > is going to take -display and -geometry, and most > > are likely to take other arguments, a better solution > > is needed. > > Maybe a better solution is needed but your patch doesn't offer such a > solution. I would prefer that it is not included because the vast > majority of programs in */X11/* do take -display and it is useful to be > able to complete it. If there is a particular program where it is > annoying you such as imake, you can always write a custom completion for > it. The */X11/* is in my opinion better than having a huge list of > programs after #compdef in _x_arguments. I second that. I think Clint's patch was in response to the article/mail on one of the Debian lists which I found and which made me add file-completion to _x_arguments. Hm, we could make it call _default instead... The patch is relative to the CVS so it also turns the #autoload back into a #compdef (with a slightly different pattern then before; are there still systems with X11R[45]?). Bye Sven diff -ru ../z.old/Completion/X/_x_arguments Completion/X/_x_arguments --- ../z.old/Completion/X/_x_arguments Tue Feb 22 09:11:00 2000 +++ Completion/X/_x_arguments Tue Feb 22 09:59:27 2000 @@ -1,4 +1,4 @@ -#autoload +#compdef -P */X11(|R[456])/* local ret long xargs @@ -7,7 +7,7 @@ '-geometry:geometry:_x_geometry' ) -(( $# )) || xargs=( "$xargs[@]" '*:files: _files' ) +(( $# )) || xargs=( "$xargs[@]" '*:default: _default' ) long=$argv[(I)--] if (( long )); then -- Sven Wischnowsky wischnow@informatik.hu-berlin.de