From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23059 invoked by alias); 6 Feb 2013 16:02:17 -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: X-Seq: 17634 Received: (qmail 7612 invoked from network); 6 Feb 2013 16:02:02 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_PASS autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at samsung.com does not designate permitted sender hosts) X-AuditID: cbfec7f5-b7fd76d000007247-d7-51127e75e94b Date: Wed, 06 Feb 2013 16:01:55 +0000 From: Peter Stephenson To: zsh-users@zsh.org Subject: Re: Local arrays Message-id: <20130206160155.1b0debeb@pwslap01u.europe.root.pri> In-reply-to: <20130206154108.GE88322@ass.pp.htv.fi> References: <20130206154108.GE88322@ass.pp.htv.fi> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: quoted-printable X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupmluLIzCtJLcpLzFFi42I5/e/4Fd3SOqFAg1cLWS12nFzJ6MDoserg B6YAxigum5TUnMyy1CJ9uwSujG8vFrIWNLFVfJmxg7WB8RVLFyMHh4SAicTadWZdjJxAppjE hXvr2boYuTiEBJYySrzb9I0RymGS+HnoKTtIFYuAqsTnV11sIDabgKHE1E2zGUFsEQFRieUr NoPVCAtISnzd/5UZxOYVsJe4P/8eWD2ngLFE87oZYIuFBIwkDp/UBQnzC+hLXP37iQniCHuJ mVfOMEK0Ckr8mHyPBcRmFlCXmDRvETOErS3x5N0F1gmMArOQlM1CUjYLSdkCRuZVjKKppckF xUnpuUZ6xYm5xaV56XrJ+bmbGCEB+HUH49JjVocYBTgYlXh4b+oJBgqxJpYVV+YeYpTgYFYS 4c1zEgoU4k1JrKxKLcqPLyrNSS0+xMjEwSnVwCi6eLlW1T3nqcL7F22PTSmsZ0zX93NaNang VphHDrfM5dMBqlM2Bv08PNuk7uSVb4tc5vrM5/rKKnogcM9Oz88sWe1n2qoLVtqUyVbZM2+V iPPy9lvdU/DixuZFx95vEZB2YXD533Zwvk+LZtqETWxiZWozNDsOL5rjW9ry8EnDn6k8z6QY XymxFGckGmoxFxUnAgCsyex5HgIAAA== On Wed, 06 Feb 2013 17:41:08 +0200 Atte Peltom=EC=B1=84ki wrote: > Can someone explain the following behaviour in declaring local arrays? It's actually simpler than you suppose: you can't declare local arrays in one go. An expresion like: local -a foo=3D(one two three) isn't an array assignment, because arguments to local are just like any argument to any other command (to a first approximation). It's a declaration with the argument "foo=3D(one two three)". Normally in zsh that parenthesised expression at the end looks like a set of glob qualifiers, i.e. a bit like "*(.)" or something like that. That's the "unknown file attribute" error. You need to split this up: local -a foo foo=3D(one two three) pws