From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22615 invoked by alias); 14 Jul 2013 17:26:11 -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: 17873 Received: (qmail 2192 invoked from network); 14 Jul 2013 17:25:56 -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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at mugenguild.com does not designate permitted sender hosts) Date: Sun, 14 Jul 2013 19:25:51 +0200 From: Valodim Skywalker To: zsh-users@zsh.org Subject: Re: How to iterate over an array of associative arrays Message-ID: <20130714172551.GA25661@mugenguild.com> Mail-Followup-To: zsh-users@zsh.org References: <20130714161437.GA25112@mugenguild.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="azLHFNyN32YCQGCU" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) --azLHFNyN32YCQGCU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline The (e) flag is basically eval for parameter expansion. Using :-, an inline string is created which looks like $a1[key], where the $ is the escaped one, the a1 comes from $i, and \[key] is just added, escaping the [ so it's not used as array subscript of $i. Cheers, - V --azLHFNyN32YCQGCU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlHi3x8ACgkQxCa+aHUWYdS7vgCg5ZuFJrj1yV4zwad7y9auDhy0 7hMAnjwHcd4ePFGpAIPsHxDHPMfZzjXg =fq9I -----END PGP SIGNATURE----- --azLHFNyN32YCQGCU--