* Re: PATCH: _x_arguments too broad
@ 2000-02-22 9:00 Sven Wischnowsky
2000-02-22 17:55 ` Peter Stephenson
0 siblings, 1 reply; 4+ messages in thread
From: Sven Wischnowsky @ 2000-02-22 9:00 UTC (permalink / raw)
To: zsh-workers
Oliver Kiddle wrote:
> Clint Adams wrote:
> >
> > zsh 433 % /usr/bin/X11/imake <TAB>-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
^ permalink raw reply [flat|nested] 4+ messages in thread
* PATCH: _x_arguments too broad
@ 2000-02-21 18:28 Clint Adams
2000-02-21 18:54 ` Oliver Kiddle
0 siblings, 1 reply; 4+ messages in thread
From: Clint Adams @ 2000-02-21 18:28 UTC (permalink / raw)
To: zsh-workers
zsh 433 % /usr/bin/X11/imake <TAB>-display
-display -geometry
Not very useful. OTOH, /usr/openwin/bin/imake will
complete files, which is perhaps more desirable in
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.
Index: Completion/X/_x_arguments
===================================================================
RCS file: /cvs/zsh/zsh/Completion/X/_x_arguments,v
retrieving revision 1.1.1.4
diff -u -r1.1.1.4 _x_arguments
--- Completion/X/_x_arguments 2000/02/18 11:10:37 1.1.1.4
+++ Completion/X/_x_arguments 2000/02/21 18:20:28
@@ -1,4 +1,4 @@
-#compdef -P */X11/*
+#autoload
local ret long xargs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: PATCH: _x_arguments too broad
2000-02-21 18:28 Clint Adams
@ 2000-02-21 18:54 ` Oliver Kiddle
0 siblings, 0 replies; 4+ messages in thread
From: Oliver Kiddle @ 2000-02-21 18:54 UTC (permalink / raw)
To: Clint Adams; +Cc: zsh-workers
Clint Adams wrote:
>
> zsh 433 % /usr/bin/X11/imake <TAB>-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.
> 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.
Oliver Kiddle
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2000-02-22 17:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-02-22 9:00 PATCH: _x_arguments too broad Sven Wischnowsky
2000-02-22 17:55 ` Peter Stephenson
-- strict thread matches above, loose matches on Subject: below --
2000-02-21 18:28 Clint Adams
2000-02-21 18:54 ` Oliver Kiddle
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).