From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12056 invoked by alias); 8 Nov 2015 18:24:10 -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: 37077 Received: (qmail 20066 invoked from network); 8 Nov 2015 18:24:08 -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 autolearn=ham autolearn_force=no version=3.4.0 X-Originating-IP: [86.6.158.222] X-Spam: 0 X-Authority: v=2.1 cv=P+nH/X0u c=1 sm=1 tr=0 a=2SBOh4l1h08DI0L+aujZyQ==:117 a=2SBOh4l1h08DI0L+aujZyQ==:17 a=NLZqzBF-AAAA:8 a=kj9zAlcOel0A:10 a=q2GGsy2AAAAA:8 a=RGTRqF9ST58pbwzzFJkA:9 a=CjuIK1q_8ugA:10 Date: Sun, 8 Nov 2015 18:18:33 +0000 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: Inconsistency with SHWORDSPLIT and leading spaces Message-ID: <20151108181833.574cf0d6@ntlworld.com> In-Reply-To: <151107114314.ZM24285@torch.brasslantern.com> References: <87a8qr75za.fsf@gmail.com> <20151106170007.5196bd5e@pwslap01u.europe.root.pri> <20151107174255.74054b28@ntlworld.com> <151107114314.ZM24285@torch.brasslantern.com> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sat, 7 Nov 2015 11:43:14 -0800 Bart Schaefer wrote: > On Nov 7, 5:42pm, Peter Stephenson wrote: > } > } +/* > } + * Bit flags passed back from multsub() to paramsubst(). > } + */ > > Maybe now that we're doing this, we could have a bit flag passed in the > other (and back?) direction for whether the (P) flag is in effect, and > thereby fix the ${${(P)hash}[index]} thing? It's a bit more complicated than that, though maybe doable. If: - we spot on the way down this is a multsub when we reached the nested paramsubst() (we could do that with a pf_flags bit) - we return a name of a parameter and a flag saying what we're doing on noticing this - we pass this up to the to paramsubst() regardless of what else is going on in the prefork() and the multsub() --- this is the bit I a little scared of, but (P) is so explicit in what it's doing maybe that's OK - in the upper paramsubst we use the flag to retrieve a Value based on the return, i.e. it now really is just a name for use up above as you might have been entitled to think it always was --- this is surely doable but I bet it's messier than you'd expect does that do it? pws