From ab7be4238ca89b5dca482a1c3b3fd013b105750e Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 14 Sep 2017 21:43:37 +0100 Subject: More [key]=value tweaks Some rephrasings. Update typeset -p for associative arrays to use new syntax. --- Test/B02typeset.ztst | 2 ++ Test/V10private.ztst | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'Test') diff --git a/Test/B02typeset.ztst b/Test/B02typeset.ztst index ae218047c..7923ae3a6 100644 --- a/Test/B02typeset.ztst +++ b/Test/B02typeset.ztst @@ -763,6 +763,7 @@ for key in ${(ok)keyvalhash}; do print -l $key $keyvalhash[$key] done + typeset -p keyvalhash 0:Substitution in [key]=val syntax >* >?not_globbed? @@ -776,3 +777,4 @@ >another value >the key >the value +>typeset -A keyvalhash=( ['*']='?not_globbed?' ['another key']='another value' ['the key']='the value' ) diff --git a/Test/V10private.ztst b/Test/V10private.ztst index 78ecd48ea..880784e12 100644 --- a/Test/V10private.ztst +++ b/Test/V10private.ztst @@ -123,7 +123,7 @@ print ${(kv)hash_test} 0:private hides value from surrounding scope in nested scope >typeset -a hash_test=( top level ) ->typeset -A hash_test=( in function ) +>typeset -A hash_test=( [in]=function ) >typeset -g -a hash_test=( top level ) >array-local top level >top level -- cgit 1.4.1