From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1865 invoked by alias); 23 Jun 2015 20:17:17 -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: 35577 Received: (qmail 26041 invoked from network); 23 Jun 2015 20:17:16 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.0 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=x6OLZGKJq54lKae5Sqt664JOKALVpqGLHvtXRRzQ2tA=; b=B8hMZw1K8MKbQJrJPt9MvtHPVY+MEy4eeEkrMnj6efdOxGVwOOUW6w5YVawiuqzctV jUvZopdf5K+xxDFx7ElAomaKWw9oGyvT9PxaZP1x58pS2eybJRiP3CvvrBvi+usv9Q/d 8qggvX5UpabOs1fMKBKcG3kILTzHpaOfiFeA6tiRelE1Un6qr85IFeNYuicMA0Tm+H9T 6qWVt5SSqfjs1cC9Qh8Ow5v+xvwcoH0sQcvwP9NvNuNCbP6bH7Q1RylpXm/TBguGQxPx FUQPliZkOxfYVs/MSFrVD3wEcdNnV7lZyvleu1SJK3SsZpg+Pgiehw+hkVL3yslFT0vv wnUQ== X-Gm-Message-State: ALoCoQmUW9IuOw4vDJuqYohJLvdFEQ/vOjGKHByCIP8kfJttNqiWq6P2gBL60VS4KiKsZEWnJ0Pz X-Received: by 10.182.213.227 with SMTP id nv3mr31145882obc.10.1435090631268; Tue, 23 Jun 2015 13:17:11 -0700 (PDT) From: Bart Schaefer Message-Id: <150623131706.ZM6164@torch.brasslantern.com> Date: Tue, 23 Jun 2015 13:17:06 -0700 In-Reply-To: Comments: In reply to Mikael Magnusson "Re: Typeset with array" (Jun 23, 7:52pm) References: <5578996E.3080700@thequod.de> <150610191427.ZM30841@torch.brasslantern.com> <5579C247.1060800@thequod.de> <150611183639.ZM32247@torch.brasslantern.com> <20150612094237.338f79d5@pwslap01u.europe.root.pri> <20150619123930.2688d9e3@pwslap01u.europe.root.pri> <20150621210512.113577a6@ntlworld.com> <20150621213842.621886e0@ntlworld.com> <20150623174719.43eaa1e2@pwslap01u.europe.root.pri> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: "Zsh Hackers' List" Subject: Re: Typeset with array MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jun 23, 7:52pm, Mikael Magnusson wrote: } } This isn't really related to this series, but I noticed it now for the } first time; what's the deal with the space at the end of associative } arrays in typeset -p output? With a normal array, the number of elements is known, so you know when you've reached the last one and can skip printing the space after it. When traversing a hash table, you don't know if you've reached the last element until you've passed it; it's more straighforward to print out ("%s %s ", key, value) for every element than to keep track of whether you are past the first element but not yet at the last one. If I were going to "fix" it for no reason other than the consistency, I'd simply add MORE spaces rather than try to squash that one. typeset -a a a=( b ) typeset -A b b=( b c )