Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Append to array via (P) flag
- X-seq: zsh-workers 40860
- From: Sebastian Gniazdowski <psprint3@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Append to array via (P) flag
- Date: Sat, 18 Mar 2017 08:13:11 -0700
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=lC68HlyddJBKam+YTy29D3O7bGE=; b=38otzAMnFcVi3xpErJGRJM1d RkDsgQikO3WttlFO8537XQAgpjS8ERoFYdRX+4T+2G6hsrd6gUD7bXvB3MIN6VXK vCLKqWbGYU9c2Ef/Jp3s+eLLdTj3PHREi1775RAT2WOQJLMidFP+paQYgUKfKLDr YR3ALPN62866ceBpchR+25k3Xg9nf0sP8bvMrHiwbVzRG3HleUvOFNxTZmEHjtBF FXczU0JHmXafRtGbvCkB4CVdV+uJajNEpBZWNSagppQAn80PzEFhRcG3wjaA4NiW 4QxdJ5O7ohWO0Ztnlsw4opp4w5gXYFGKdrR6QhXN3bEIkpTECJ/bWjAvyh2lAQ==
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=lC68HlyddJBKam+YTy29D3O7bGE=; b= fUWsl6CJ+3+DKbvtxFZnowj2GSBDrLIbkgnGSheOhihmrA9HjMU03Mlpws3BiQX5 KzHv7/lbwyWZRxMG52WJjJRxuuUB8qWkqNmqelBwpunZkUf81FOzS6QjpRfaEeaY hZO3MvnogU/aNRxuAj+vzM5QLy38GO/O1fY4uGfvjmXHMk5k91c/OwSYa4WoAjtW oABWEfXOMrQ1Y4S95cfhJVvSZb4pZI5Ny3gCcQIoco6pyz9RsbCNd1KETs3Vm8Vx /angGRdkP01i3gw8t2+lP8ptMPVFf6mFvWZoPHmHkHHkKlMTdvPb6Nq7hrXTKDw6 fpC+H3Kc3FLrsYRhhLRAwA==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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@xxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author