zsh-workers
 help / color / mirror / code / Atom feed
* Append to array via (P) flag
@ 2017-03-18 15:13 Sebastian Gniazdowski
  2017-03-18 17:07 ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Sebastian Gniazdowski @ 2017-03-18 15:13 UTC (permalink / raw)
  To: zsh-workers

Hello,
I've written simple text editor in ZUI and the supported number of lines
is 1000. With 5.3.1-dev-0 it is 6000, but the code needs special
construct. Problem is in API function that does:

__output=( "${(P@)__var_name}" "New data" )
: ${(PA)__var_name::=${__output[@]}}

There is no append-syntax recognized by (P), so no easy way to trigger
optimizations. Maybe this can be added? Parameter like __var_name could
be set to:
- reply[]
- reply[-]
- reply[,]

So doing e.g. reply[,]=( "New data" ) would work like reply+=( "New
data" )

Maybe it's best to discover something really special so there is no
impression that shell syntax changes. Or opposite, use e.g. comma,
because it is already used inside [].

-- 
  Sebastian Gniazdowski
  psprint3@fastmail.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-03-18 21:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-18 15:13 Append to array via (P) flag Sebastian Gniazdowski
2017-03-18 17:07 ` Bart Schaefer
2017-03-18 17:32   ` Sebastian Gniazdowski
2017-03-18 21:50     ` Bart Schaefer

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).