From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 823 invoked by alias); 14 Jun 2017 20:36:02 -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: 41292 Received: (qmail 23590 invoked from network); 14 Jun 2017 20:36:02 -0000 X-Qmail-Scanner-Diagnostics: from mail-qt0-f175.google.com 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(209.85.216.175):SA:0(-0.0/5.0):. Processed in 7.058754 secs); 14 Jun 2017 20:36:02 -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=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.216.175 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=CbyI0L3CBNbzBM00o1a9nooct0Xyfp272zDb9Unwq14=; b=cg0H7IzCTWE2WKclmVRCwXQcBbohb8MVrstYtzl6cMIcNiDSjrNcoYp1RvuActKLs/ ykOXtx2D09rHs9967LfhgNVJYq8+Kd7gIlI19Uja9pHJE4PXqlt4sL9vXR7BcQcuawcY iKUavvad8ZpXgOi3CmFuUHz/Cs67zEzmB52wQsgabRTLfY/A+TRFXBEYq+a0P3vvQp00 BFVp08Etplm8Pw3ZXVz3HEs9STHHat7YJhqsDAG33HcAWI+VprH3rpTdN/N1bJqf+f7v hpF5913EuJngyeM4lug8/VfttQ5xn9rkIVUwNjvHFdJf8zKPb5nKx66t60TS/HfKNYgH rHNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=CbyI0L3CBNbzBM00o1a9nooct0Xyfp272zDb9Unwq14=; b=qMSzhVx8ARtds3XISF13DSARyGE0oCoep1RcaSrnA9VDd4F4NXknUsRDCPiCZp8Jn1 JTZB2nZ0cIPfA02u+83xdCDQHO/9BBFoS1h2nJQKkrCWrOMZE3l1OplzKxJqcF7du+ST xSXlldmZC1RIZJGRQmDVehYbgO4VC5hENEsCxtPgpNPQy2wQHBY/lz06vtF1XHcma+y2 RWzXL8LBIBnl4EwDSwylw1p9rFIm9tyM6OAbFShdqYBnKjMEI6y1Y3ExGiR3Dj5qKTtN 4xjP4KlvDq62J7fy1pE37uaEXEnvnqGGPPO5FAx1NlgbGN7geoKf7jaVHPoT1B4iz77X VCuQ== X-Gm-Message-State: AKS2vOyY93sxJ1Exze992HKGL6kp9m/giZlsdGHujkYXaLc24ZZt0Wz/ hyWlmaswwr5hBXZxpaiZ3e2ygp68Hpc9 X-Received: by 10.55.158.208 with SMTP id h199mr2314311qke.254.1497472547565; Wed, 14 Jun 2017 13:35:47 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: Bart Schaefer Date: Wed, 14 Jun 2017 13:35:47 -0700 Message-ID: Subject: Re: 5.3.1-dev-0 difference in array=( "${(PA@)var_name}" ) To: Sebastian Gniazdowski Cc: "zsh-workers@zsh.org" Content-Type: text/plain; charset="UTF-8" On Wed, Jun 14, 2017 at 10:09 AM, Sebastian Gniazdowski wrote: > Hello, > % zsh-5.3.1 > % var_name="abcdef"; array=( "${(PA@)var_name}" ); echo ${#array} > 1 The (A) flag doesn't mean anything in this context in 5.3.1, that was added about 2 months after the 5.3.1 release. So in the above example ${(P)var_name} returns a scalar and the (@) flag is also meaningless. In this next example -- > % zsh-5.3.1-dev-0 > % var_name="abcdef"; array=( "${(PA@)var_name}" ); echo ${#array} > 0 -- the (A) flag does apply , so ${(PA)var_name} is an empty array rather than an unset scalar, and (@) causes the double-quotes to resolve to nothing rather than to a quoted empty string, just as "${emptyarray[@]}" would do.