From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28742 invoked by alias); 13 Jan 2018 16:50:28 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 23085 Received: (qmail 19998 invoked by uid 1010); 13 Jan 2018 16:50:28 -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(-1.9/5.0):. Processed in 6.343818 secs); 13 Jan 2018 16:50:28 -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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: psprint@zdharma.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | X-Virus-Scanned: by amavisd-new using ClamAV (21) Date: Sat, 13 Jan 2018 17:50:17 +0100 From: Sebastian Gniazdowski To: Peter Stephenson , Zsh Users Message-ID: In-Reply-To: <20171213113408.1d7fb3db@pwslap01u.europe.root.pri> References: <20171212150024.13a1e78b@pwslap01u.europe.root.pri> <20171213113408.1d7fb3db@pwslap01u.europe.root.pri> Subject: Re: Is outer quoting not needed (docs say "redundant")? X-Mailer: Airmail (467) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline On 13 Dec 2017 at 12:34:08, Peter Stephenson (p.stephenson@samsung.com) wrote: > On Wed, 13 Dec 2017 08:00:51 +0100 > Sebastian Gniazdowski wrote: > > gitout=( "${(@f)"$( "${gitcmd[@]}" )"}" ) > > > > Is it the same? > > It should be, because the count of braces doesn't go to zero between the > first "${" and the last "}" (see the rules I summarised last time). So > only the final double quote causes quoting to end. Going this way, in following braces also don't go zero.. But maybe it's not a bug: arr=( "${(@Q)${(z@):-"a b" c}}" ) print -rl -- "${(@)arr}" a b c arr=( "${(@Q)${(z@):-a\\ b c}}" ) print -rl -- "${(@)arr}" a b c It would be an interesting case because inner quotes wouldn't be a no-op. -- Sebastian Gniazdowski psprint /at/ zdharma.org