* RE: parameter completion in expansions
@ 1999-07-09 13:39 Sven Wischnowsky
0 siblings, 0 replies; 4+ messages in thread
From: Sven Wischnowsky @ 1999-07-09 13:39 UTC (permalink / raw)
To: zsh-workers
Andrej Borsenkow wrote:
> > 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.
>
> Oh, yes. Have I never tried it, silly me? But the space after $param (without
> braces) not. Should it?
Hm, yes. Makes completion after `$' slightly slower, but I guess one
will seldom or never notice this.
Bye
Sven
diff -u oc/Base/_parameter Completion/Base/_parameter
--- oc/Base/_parameter Thu Jul 8 11:11:45 1999
+++ Completion/Base/_parameter Fri Jul 9 15:38:25 1999
@@ -1,3 +1,3 @@
#compdef -parameter-
-compgen -v
+_parameters -S ' ' -r '['
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: parameter completion in expansions
1999-07-09 13:28 Sven Wischnowsky
@ 1999-07-09 13:33 ` Andrej Borsenkow
0 siblings, 0 replies; 4+ messages in thread
From: Andrej Borsenkow @ 1999-07-09 13:33 UTC (permalink / raw)
To: Sven Wischnowsky, zsh-workers
>
> 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.
>
Oh, yes. Have I never tried it, silly me? But the space after $param (without
braces) not. Should it?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: parameter completion in expansions
@ 1999-07-09 13:28 Sven Wischnowsky
1999-07-09 13:33 ` Andrej Borsenkow
0 siblings, 1 reply; 4+ messages in thread
From: Sven Wischnowsky @ 1999-07-09 13:28 UTC (permalink / raw)
To: zsh-workers
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@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* parameter completion in expansions
@ 1999-07-09 13:21 Andrej Borsenkow
0 siblings, 0 replies; 4+ messages in thread
From: Andrej Borsenkow @ 1999-07-09 13:21 UTC (permalink / raw)
To: ZSH workers mailing list
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?
As this really depends on personal usage, may be, even some config key is
appropriate.
/andrej
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1999-07-09 13:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-07-09 13:39 parameter completion in expansions Sven Wischnowsky
-- strict thread matches above, loose matches on Subject: below --
1999-07-09 13:28 Sven Wischnowsky
1999-07-09 13:33 ` Andrej Borsenkow
1999-07-09 13:21 Andrej Borsenkow
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).