From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3857 invoked by alias); 14 Nov 2015 18:51:42 -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: 37108 Received: (qmail 3071 invoked from network); 14 Nov 2015 18:51:40 -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=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern_com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version:content-type; bh=/xNghNS1t68H/XDQ025JWym7rc47DvsQriL1o2n8New=; b=R5cRzUw9tCoUgk1oHr7QbhUFZQk6Q3JDoMJ5XGqZ7ypmsZFigLmHLqeLCZNbRg0uEj QO6VxP68xUf6s0DhcgA9WtphMj6WVcsElUFfIO0t4CAXKf3Rx1OzAg4Cnb0wcLGnK+wY oQKnml/iqf6r19DZTvB0Q2RJ65gpSXCkwSq5IWOIh7M68VgrFSzN78qQg9DtRk9qCwZD gImTwJ6M36LUp9Swun1tO45/Qrs96FJUS2ZNmhob8iBmQd5yUTT1fXXshFOms2fwOrjD CNM6S31UzFFGTUK9PTma8+CkYjWtnJS1YpO1O2ws/7OgQZhQX7i1uexC64ZKRiEpGR46 ljvQ== 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=/xNghNS1t68H/XDQ025JWym7rc47DvsQriL1o2n8New=; b=OvKcvr7em1uiGR2CEIrHd0Hwa01c2j9YFSNAsWZAiFtcMlvw5hW2KAxnSUpa8n8n2r pTy8ALWAY+PACoCoMo+N6PhUahsRcG2VrvJ49CI1D61JvTJ9vxyzb9pUDN/VncV52LGa 83z8xtw3XsJ9EORiiGURtyF+l+Pc6gmZiJ65FEXK+X2xuouQIDUxiPccerVRRtYKdeaR uNnqT0JjmWJcYXMFo/LLSXv/pwoAJonELsJMzJoR/L60dgbjGHjuDC3l9X+5nrvMteNz wShvjcC6zMT329O3DAlk9+PrUAgzUE1n1a64SvUl0KwQtYTvfZ/Bldmzl92fM710RQm9 D9lA== X-Gm-Message-State: ALoCoQlB7Ut5GxzLiWC/uXsPIMpodvWiwRvmHu2Yti+J8dTAoPerflpHzpxkU6WAXJzq6TpRQZFv X-Received: by 10.182.114.167 with SMTP id jh7mr16768765obb.70.1447527098032; Sat, 14 Nov 2015 10:51:38 -0800 (PST) From: Bart Schaefer Message-Id: <151114105134.ZM1639@torch.brasslantern.com> Date: Sat, 14 Nov 2015 10:51:34 -0800 In-Reply-To: Comments: In reply to Peter Stephenson "Re: PATCH: nested ${(P)} (formerly SHWORDSPLIT and leading spaces)" (Nov 14, 9:45am) References: X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: PATCH: nested ${(P)} (formerly SHWORDSPLIT and leading spaces) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Nov 14, 9:45am, Peter Stephenson wrote: } } Sorry, I obviously didn't explain the change properly. The new } behaviour is both expected and necessary to have the clean separation } between levels of nesting: if a (P) occurs inside multiple braces, } the immediately surrounding level deals with the parameter name, } and the outer level deals with the value. I think it's more subtle than that. It occurs only when: 1. there is an outer ${...} around the ${(P)...} expansion 2. the (P) is combined with one of (l), (r), or (j). If there's only one level, ${(Pr.N.)...} et al. work as expected. So I suspect that the specific code path(s) used by padding and joining are failing to turn off the flag bit that indicates the value has been fetched already, causing the outer ${ } to unnecessarily attempt again to fetch the value. Or something like that. -- Barton E. Schaefer