From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11174 invoked by alias); 11 Nov 2015 18:13:15 -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: 37093 Received: (qmail 12505 invoked from network); 11 Nov 2015 18:13:12 -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,HTML_MESSAGE, 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=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=xrzTHx4Kec2aphz5zWloYLfCGqh7UU5sOH60R3tdjUA=; b=DahG7VC80zSlRTJGli+10utFITcJZxRyOTARNdbz3vcZ9gPBt1pN74XYHFpU1zD7ne py3jN6537lqnurnqtjH3eJsmsIZc0hLo+A3o4psDtc0RxdQKi4diQwu6Mij3FhwbGkCJ aYg3choMDTZhCIwWYnlzUIybefHtEkxSpUaKnnx42xFKs8b+QaAeQ8IJUVOGofk1ndhb EBQy4wx5Z4Ea6xrSUU514+mcK+tFf6SFUnAyK/yrI5GKmL7GwrtBGvsufZi92UuvzPzA QBb0SeA10upUvVMARQXXAMP2d76jhqwSY4vFGie9lG8GeO4j838vjy8TE0+FywZ+0ghL mc2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=xrzTHx4Kec2aphz5zWloYLfCGqh7UU5sOH60R3tdjUA=; b=lEo02k1kFUfO3v6FScE9VvT72l2n1qSx8biCCfAVbfUsTssBLsWT1iyQiRD9UJjPN9 J9gQbrV4SSpAJvTRfk8gncwgzcno07WCU9qAJZAXZeACjFVjCcppByQr+sCUFMfFzQWO yJ9H7x4IKeuqUPdujYNFAPpMP8MSkaq9h+k4lYbXj8VIlAxXtWVH6MCRnkMD1xD0BWhG 61hpZwc8xuWSQdYJEsBMPaT5ffYWwfZikNJZmdeRccEnASIx1aMBkIkuAilHl8msJRCL 0WJnzbwx1aBCX09iLXrOjkIz7YD5RzFIOi/zXdjHPjT+v7g8E4jq88mVUnFr7AIFo2Vp w9Fw== X-Gm-Message-State: ALoCoQlqTqWiVsKf5NzbMx11HTKqE56RrCssb7RfZ5MKuUgt8wJLHfFQJ0qpImgK4DHGUSpdlYUH MIME-Version: 1.0 X-Received: by 10.194.134.135 with SMTP id pk7mr11502644wjb.111.1447265590172; Wed, 11 Nov 2015 10:13:10 -0800 (PST) In-Reply-To: <20151111174911.4384bf73@pwslap01u.europe.root.pri> References: <87a8qr75za.fsf@gmail.com> <20151106170007.5196bd5e@pwslap01u.europe.root.pri> <20151107174255.74054b28@ntlworld.com> <151107114314.ZM24285@torch.brasslantern.com> <20151108181833.574cf0d6@ntlworld.com> <20151111174911.4384bf73@pwslap01u.europe.root.pri> Date: Wed, 11 Nov 2015 10:13:10 -0800 Message-ID: Subject: Re: PATCH: nested ${(P)} (formerly SHWORDSPLIT and leading spaces) From: Bart Schaefer To: Peter Stephenson Cc: Zsh hackers list Content-Type: multipart/alternative; boundary=089e01228d9e65fe50052447c708 --089e01228d9e65fe50052447c708 Content-Type: text/plain; charset=UTF-8 On Nov 11, 2015 9:59 AM, "Peter Stephenson" wrote: > > This isn't obviously broken, yet. You can explore while I think about > tests. Nifty. > Hmmm... should I sanity check that the the substituted name is an > identifier, or is it a feature that > > % array=(one two three) > % word='array[2]' > % print ${${(P)word}[2]} > w > > works? I've used that trick before, though the context was with nested (P) not working. I guess I'd leave it as a feature ... essentially if the value would be legal as the left side of an assignment, it should be OK here. Check ${(P)thing::=newvalue} too ... --089e01228d9e65fe50052447c708--