From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1408 invoked by alias); 21 Jun 2015 20:38:49 -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: 35553 Received: (qmail 26014 invoked from network); 21 Jun 2015 20:38:46 -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,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.0 X-Originating-IP: [80.3.228.158] X-Spam: 0 X-Authority: v=2.1 cv=AJvf2gUA c=1 sm=1 tr=0 a=P+FLVI8RzFchTbbqTxIDRw==:117 a=P+FLVI8RzFchTbbqTxIDRw==:17 a=kj9zAlcOel0A:10 a=NLZqzBF-AAAA:8 a=knDCQuRjVPq43gcGgYUA:9 a=CjuIK1q_8ugA:10 Date: Sun, 21 Jun 2015 21:38:42 +0100 From: Peter Stephenson To: Zsh Hackers' List Subject: Re: Typeset with array Message-ID: <20150621213842.621886e0@ntlworld.com> In-Reply-To: <20150621210512.113577a6@ntlworld.com> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sun, 21 Jun 2015 21:05:12 +0100 Peter Stephenson wrote: > With a few more tests I think this is just about ready for the master > branch. (And some documentation.) Here are some very simple tests. I hadn't relaised typeset -L and -R don't work with arrays, but apparently that's not new. It doesn't appear to be documented. pws diff --git a/Test/B02typeset.ztst b/Test/B02typeset.ztst index 1819b6c..75c475c 100644 --- a/Test/B02typeset.ztst +++ b/Test/B02typeset.ztst @@ -508,3 +508,20 @@ >a2=(three four) >typeset -r r1=yes >typeset -r r2=no + + one=hidden two=hidden three=hidden four=hidden five=hidden + fn() { + local bleugh="four=vier" + typeset -R10 one=eins two=(zwei dio) three $bleugh five=(cinq cinque) + three=drei + print -l $one $two $three $four $five + } + fn +0:typeset reserved word interface: basic +> eins +>zwei +>dio +> drei +> vier +>cinq +>cinque