From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10701 invoked by alias); 13 Apr 2017 16:29:33 -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: X-Seq: 40969 Received: (qmail 19827 invoked from network); 13 Apr 2017 16:29:33 -0000 X-Qmail-Scanner-Diagnostics: from aok120.rev.netart.pl by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(85.128.245.120):SA:0(0.0/5.0):. Processed in 2.104853 secs); 13 Apr 2017 16:29:33 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: psprint@zdharma.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at zdharma.org does not designate permitted sender hosts) X-Virus-Scanned: by amavisd-new using ClamAV (17) Date: Thu, 13 Apr 2017 18:29:24 +0200 From: Sebastian Gniazdowski To: zsh-workers@zsh.org Message-ID: Subject: Re: [PATCH] Forcing array interpretation in parameter substitution X-Mailer: Airmail (231) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Just realized that this isn't a "5.0.2" or so thing. Great commit really, it allows to index (z) result, or (s::) result, when there is no split and instead of array, a string is returned: >: var="abc"; echo ${${(z)var}[1]}; echo ${${(Az)var}[1]} "<- so (A) does help" a abc <- so (A) does help I wonder if there can be any workaround for older versions, tried (@z) or silly (0z) etc., and no make-array effect occurs. -- Sebastian Gniazdowski psprint /at/ zdharma.org