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

Re: parameter completion in expansions



Andrej Borsenkow wrote:

> When completing parameter name in parameter expansions zsh automatically adds
> blank or '} ' to $par / ${par . This looks like suitable default for scalars -
> but I found, that with arrays I mostly want subscription (at least in
> interactive shell).
> 
> What about adding autoremoved '[' if parameter is array? (The suffix should of
> course be removed if I press '}'). At the least, do nothing and leave cursor
> immediately after completed name?

But the `} ' is auto-removed when you type `['. And since one can also 
subscript scalars and sometimes don't want to subscript arrays I'd
prefer to not treat them differently.

> As this really depends on personal usage, may be, even some config key is
> appropriate.

That, however could be done. (But I don't plan to write it. Someone else?)

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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