Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Let's finish this new completion stuff



Another reply to this, not directly connected to the implementation of 
the completion stuff.

Peter Stephenson wrote:

> By the way, is it
> really necessary to have the `cmd=$(whence -p $COMMAND)' on every call to
> command/argument completion?  I haven't thought about it, but maybe it can
> be optimised away in a lot of cases.

The problem is that this is immediatly used when testing pattern
completions. And I think this is important to have since `*/X11/*' is
a better test for X-programs than `x*', which is just plain wrong.
I first tried `eval cmd2\==$COMMAND' but that makes zsh stop if there
is no such command (`zsh: foo not found').

> I'm still vaguely of the opinion it would be quite nice to have long
> Posix-style options for the comp* commands, as I suggested some time ago,
> e.g. 
> 
> complist -mf
> 
> could also be
> 
> complist --external --files
> 
> or something for readability.

Yes, but maybe we should do this is some generic way in builtin.c, so
that we can add such long options to (almost) all builtins. I.e. a way 
to store the long names together with the short names they are aliases 
for and then make execbuiltin() put them in the ops array as usual.


Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author