From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 11309 invoked from network); 21 May 2020 16:33:17 -0000 Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTPUTF8; 21 May 2020 16:33:17 -0000 Received: (qmail 23830 invoked by alias); 21 May 2020 16:33:12 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45886 Received: (qmail 8356 invoked by uid 1010); 21 May 2020 16:33:12 -0000 X-Qmail-Scanner-Diagnostics: from wout2-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.3/25814. spamassassin: 3.4.4. Clear:RC:0(64.147.123.25):SA:0(-2.6/5.0):. Processed in 0.685104 secs); 21 May 2020 16:33:12 -0000 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudduuddgleejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkjghfofggtgfgsehtqh dttdertdejnecuhfhrohhmpeffrghnihgvlhcuufhhrghhrghfuceougdrshesuggrnhhi vghlrdhshhgrhhgrfhdrnhgrmhgvqeenucggtffrrghtthgvrhhnpefhtdetfeehveeutd ehuddtieefgeettedtjedtffehudeiieejleetteekudetheenucfkphepjeelrddujeej rddufeegrdefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepugdrshesuggrnhhivghlrdhshhgrhhgrfhdrnhgrmhgv X-ME-Proxy: Date: Thu, 21 May 2020 16:32:34 +0000 From: Daniel Shahaf To: zsh-workers@zsh.org Subject: Re: [PATCH] vared: Escape empty elements of arrays Message-ID: <20200521163234.328a1be2@tarpaulin.shahaf.local2> In-Reply-To: <52503-1590058644.696341@0c4k.-v5l.VV1-> References: <20200519235425.13713-1-danielsh@tarpaulin.shahaf.local2> <20200521070539.46a6e9de@tarpaulin.shahaf.local2> <52503-1590058644.696341@0c4k.-v5l.VV1-> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Oliver Kiddle wrote on Thu, 21 May 2020 12:57 +0200: > Daniel Shahaf wrote: > > =E2=80=94 it seems to be impossible for the result of a vared operation= to > > include empty elements. In particular, editing an array with empty > > elements in master silently drops them. With the patch, the elements > > would become =C2=AB''=C2=BB (two bytes). =20 >=20 > For editing arrays, I typically use the following: >=20 > alias lvared=3D"IFS=3D\$'\n\n' vared" >=20 > That preserves empty elements from blank lines. Thanks! I'll see if I can add this to the manual as a tip. And maybe emit a warning if an array is edited that has empty elements.