Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Fun with new completion
- X-seq: zsh-workers 5902
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: Fun with new completion
- Date: Tue, 23 Mar 1999 14:59:13 +0100 (MET)
- In-reply-to: "Andrej Borsenkow"'s message of Tue, 23 Mar 1999 16:42:20 +0300
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Andrej Borsenkow wrote:
> bor@itsrm2:~%> vared pat
> pat path
>
> In other words, vared tried to complete the name of local variable, that is
> defined in completion function :-) pat is not defined otherwise.
>
> And it just occured to me, that the same could happen in e.g. [un]setopt. As
> I understand, they do it by listing currently set/unset options ... with the
> result, that if options are changed in some top level function, they will
> list wrong options ...
I was aware of the problem with parameter names, but hadn't thought
about the options.
Maybe we should rename the local parameters (where needed) to `_...',
modify the function `_vars' to show only parameters without a leading
underscore and be callable from everywhere.
For the options I can only see the solution to make `_main_complete'
save the original set and unset options in arrays and then add two
functions to complete from these arrays (this is currently only used
for `setopt' and `unsetopt', but to make this cleanly...).
Bye
Sven
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author