Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Typeset with array



On Sun, 21 Jun 2015 21:05:12 +0100
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx> 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



Messages sorted by: Reverse Date, Date, Thread, Author